Skip to content

security: remove vulnerable Python 2 deps (pyopenssl, pyasn1, ndg-httpsclient)#251

Open
AhsanSheraz wants to merge 2 commits intopusher:masterfrom
AhsanSheraz:security/remove-vulnerable-py2-deps
Open

security: remove vulnerable Python 2 deps (pyopenssl, pyasn1, ndg-httpsclient)#251
AhsanSheraz wants to merge 2 commits intopusher:masterfrom
AhsanSheraz:security/remove-vulnerable-py2-deps

Conversation

@AhsanSheraz
Copy link
Copy Markdown

@AhsanSheraz AhsanSheraz commented Mar 24, 2026

Summary

  • Remove pyopenssl (CVE-2026-27459), pyasn1 (CVE-2026-30922), and ndg-httpsclient from install_requires
  • Remove dead Python 2 pyopenssl injection code in pusher/requests.py (was gated behind sys.version_info < (3,))
  • Remove Python :: 2 classifier from setup.py, add Python :: 3 :: Only
  • Update README to note Python 2 is no longer supported

These dependencies were only needed for Python 2 SNI support. Python 3's stdlib ssl module handles SNI natively, making them unnecessary. The fixed versions of these libraries don't support Python 2 anyway, so upgrading is not an option — removal is the correct fix.

See full rationale in #252.

Test plan

  • All 64 existing tests pass
  • Verify no runtime issues with Python 3.10-3.12

Closes #252

…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)
Remove pyopenssl (CVE-2026-27459), pyasn1 (CVE-2026-30922), and
ndg-httpsclient from install_requires. These were only needed for
Python 2 SNI support and are dead code on Python 3.

- Remove Python 2 pyopenssl injection in pusher/requests.py
- Remove 'Python :: 2' classifier from setup.py
- Update README to note Python 2 is no longer supported

Closes pusher#252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove deprecated Python 2 dependencies (pyopenssl, pyasn1, ndg-httpsclient) with known CVEs

2 participants