Skip to content
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

Compute utils.compat.HAS_TLS lazily #7457

Merged
merged 2 commits into from
Dec 9, 2019

Conversation

chrahunt
Copy link
Member

@chrahunt chrahunt commented Dec 8, 2019

This avoids an unnecessary unconditional import of ssl and urllib3 in
utils.compat, which are pretty big contributors to import time for the main module (~30ms out of 100ms on my machine).

Next we'll refactor the value to be computed lazily.
This avoids an unnecessary unconditional import of ssl and urllib3 in
compat.
@chrahunt chrahunt added skip news Does not need a NEWS file entry (eg: trivial changes) type: refactor Refactoring code labels Dec 8, 2019
@chrahunt chrahunt changed the title Refactor/lazy has tls Compute utils.compat.HAS_TLS lazily Dec 8, 2019
@chrahunt chrahunt marked this pull request as ready for review December 8, 2019 23:17
@chrahunt chrahunt merged commit 355c303 into pypa:master Dec 9, 2019
@chrahunt chrahunt deleted the refactor/lazy-has-tls branch December 9, 2019 12:49
@chrahunt
Copy link
Member Author

chrahunt commented Dec 9, 2019

Thank you!

@pradyunsg
Copy link
Member

Toward #4768

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jan 10, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation skip news Does not need a NEWS file entry (eg: trivial changes) type: refactor Refactoring code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants