Skip to content

http_session: fix create_urllib3_context import #5333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

bastimeyer
Copy link
Member

Fix import of create_urllib3_context method on urllib3 <2.0.0. Only import from urllib3.util.ssl_ module as a fallback.


Fixes #5332

$ pip show urllib3 | grep Version
Version: 1.26.15
$ pytest -q tests/test_session.py | tail -n1
43 passed in 0.57s
$ pip show urllib3 | grep Version
Version: 2.0.2
$ pytest -q tests/test_session.py | tail -n1
43 passed in 0.57s

@bastimeyer bastimeyer added the bug label May 7, 2023
Fix import of `create_urllib3_context` method on urllib3 <2.0.0.
Only import from `urllib3.util.ssl_` module as a fallback.
@bastimeyer bastimeyer force-pushed the session/import-create-urllib3-context branch from d4452c7 to 1ed25c8 Compare May 7, 2023 23:59
@bastimeyer bastimeyer changed the title session: fix create_urllib3_context import http_session: fix create_urllib3_context import May 8, 2023
@bastimeyer bastimeyer merged commit e607559 into streamlink:master May 8, 2023
@bastimeyer bastimeyer deleted the session/import-create-urllib3-context branch May 8, 2023 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestSession.test_http_disable_dh fails with 5.5.0
1 participant