Skip to content

Commit 125be4b

Browse files
committed
urllib3 v2.0 only supports OpenSSL 1.1.1+ // Issue platformio#4614
1 parent 1490757 commit 125be4b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

setup.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,19 @@
3030
if platform.system() == "Darwin" and "arm" in platform.machine().lower():
3131
__install_requires__.append("chardet>=3.0.2,<4")
3232

33+
# issue 4614: urllib3 v2.0 only supports OpenSSL 1.1.1+
34+
try:
35+
import ssl
36+
37+
if ssl.OPENSSL_VERSION.startswith("OpenSSL ") and ssl.OPENSSL_VERSION_INFO < (
38+
1,
39+
1,
40+
1,
41+
):
42+
__install_requires__.append("urllib3<2")
43+
except ImportError:
44+
pass
45+
3346

3447
setup(
3548
name=__title__,

0 commit comments

Comments
 (0)