Skip to content

Commit

Permalink
Unlock "urllib3" package version if SSL module is supported // Issue #…
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Jun 22, 2023
1 parent 1d97982 commit a754a28
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
"marshmallow==%s" % ("3.14.1" if PY36 else "3.*"),
"pyelftools>=0.27,<1",
"pyserial==3.5.*", # keep in sync "device/monitor/terminal.py"
"requests==2.*",
"urllib3<2", # issue 4614: urllib3 v2.0 only supports OpenSSL 1.1.1+
"requests==%s" % ("2.27.1" if PY36 else "2.*"),
"semantic_version==2.10.*",
"tabulate==%s" % ("0.8.10" if PY36 else "0.9.*"),
Expand All @@ -50,6 +48,20 @@
"wsproto==%s" % ("1.0.0" if PY36 else "1.2.*"),
]

# 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,
):
minimal_requirements.append("urllib3<2")
except ImportError:
pass


setup(
name=__title__,
version=__version__,
Expand All @@ -69,7 +81,7 @@
"project/integration/tpls/*/.*.tpl", # include hidden files
"project/integration/tpls/*/.*/*.tpl", # include hidden folders
"project/integration/tpls/*/*/*.tpl", # NetBeans
"project/integration/tpls/*/*/*/*.tpl", # NetBeans
"project/integration/tpls/*/*/*/*.tpl", # NetBeans
]
},
entry_points={
Expand Down

0 comments on commit a754a28

Please sign in to comment.