Skip to content

Import ssl standard library module directly#3640

Open
chrisnovakovic wants to merge 1 commit intoboto:developfrom
chrisnovakovic:import-ssl-directly
Open

Import ssl standard library module directly#3640
chrisnovakovic wants to merge 1 commit intoboto:developfrom
chrisnovakovic:import-ssl-directly

Conversation

@chrisnovakovic
Copy link
Copy Markdown

Issue #, if available: N/A

Description of changes:

botocore.httpsession imports ssl from urllib3.util.ssl_, which is simply a reference to the ssl module from the Python standard library:

Python 3.10.12 (main, Jan 26 2026, 14:55:28) [GCC 11.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from urllib3.util.ssl_ import ssl >>> ssl <module 'ssl' from '/usr/lib/python3.10/ssl.py'> 

Avoid the extra degree of indirection by just importing ssl from the standard library in botocore.httpsession.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

`botocore.httpsession` imports `ssl` from `urllib3.util.ssl_`, which is simply a reference to the `ssl` module from the Python standard library: ``` Python 3.10.12 (main, Jan 26 2026, 14:55:28) [GCC 11.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from urllib3.util.ssl_ import ssl >>> ssl <module 'ssl' from '/usr/lib/python3.10/ssl.py'> ``` Avoid the extra degree of indirection by just importing `ssl` from the standard library in `botocore.httpsession`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant