Skip to content

Commit e39b279

Browse files
security: remove vulnerable Python 2 dependencies pyopenssl, pyasn1, ndg-httpsclient
These dependencies were only used for Python 2 SNI support (gated behind `sys.version_info < (3,)` in requests.py) and are unnecessary on Python 3, which handles SNI natively via the stdlib ssl module. Removes: - pyopenssl (CVE-2026-27459, fixed in 26.0.0) - pyasn1 (CVE-2026-30922, fixed in 0.6.3) - ndg-httpsclient (depends on both) Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 57eee77 commit e39b279

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

pusher/requests.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@
99
from pusher.http import process_response
1010

1111
import requests
12-
import sys
1312
import os
1413

1514

16-
if sys.version_info < (3,):
17-
import urllib3.contrib.pyopenssl
18-
urllib3.contrib.pyopenssl.inject_into_urllib3()
19-
2015
CERT_PATH = os.path.dirname(os.path.abspath(__file__)) + '/cacert.pem'
2116

2217

setup.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@
4040
'six',
4141
'requests>=2.3.0',
4242
'urllib3',
43-
'pyopenssl',
44-
'ndg-httpsclient',
45-
'pyasn1',
4643
'pynacl'
4744
],
4845

0 commit comments

Comments
 (0)