Skip to content

Commit

Permalink
urllib3 v2.0 only supports OpenSSL 1.1.1+ // Issue #4614
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Dec 30, 2023
1 parent 1490757 commit 125be4b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@
if platform.system() == "Darwin" and "arm" in platform.machine().lower():
__install_requires__.append("chardet>=3.0.2,<4")

# issue 4614: urllib3 v2.0 only supports OpenSSL 1.1.1+
try:
import ssl

if ssl.OPENSSL_VERSION.startswith("OpenSSL ") and ssl.OPENSSL_VERSION_INFO < (
1,
1,
1,
):
__install_requires__.append("urllib3<2")
except ImportError:
pass


setup(
name=__title__,
Expand Down

0 comments on commit 125be4b

Please sign in to comment.