GeezerVison is showing github.com — [3.11] gh-91539: improve performance of get_proxies_environment (GH-91566) by miss-islington · Pull Request #97918 · python/cpython
Conversation
miss-islington
commented
Oct 5, 2022
•
edited by bedevere-bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
-
improve performance of get_proxies_environment when there are many environment variables
-
📜🤖 Added by blurb_it.
-
fix case of short env name
-
fix formatting
-
fix whitespace
-
whitespace
-
Update Lib/urllib/request.py
Co-authored-by: Carl Meyer [email protected]
- Update Lib/urllib/request.py
Co-authored-by: Carl Meyer [email protected]
- Update Lib/urllib/request.py
Co-authored-by: Carl Meyer [email protected]
- Update Lib/urllib/request.py
Co-authored-by: Carl Meyer [email protected]
Co-authored-by: Carl Meyer [email protected]
- Update Lib/urllib/request.py
Co-authored-by: Carl Meyer [email protected]
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Carl Meyer [email protected]
(cherry picked from commit aeb28f5)
Co-authored-by: Pieter Eendebak [email protected]
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…nGH-91566)
* improve performance of get_proxies_environment when there are many environment variables
* 📜🤖 Added by blurb_it.
* fix case of short env name
* fix formatting
* fix whitespace
* whitespace
* Update Lib/urllib/request.py
Co-authored-by: Carl Meyer <[email protected]>
* Update Lib/urllib/request.py
Co-authored-by: Carl Meyer <[email protected]>
* Update Lib/urllib/request.py
Co-authored-by: Carl Meyer <[email protected]>
* Update Lib/urllib/request.py
Co-authored-by: Carl Meyer <[email protected]>
* whitespace
* Update Misc/NEWS.d/next/Library/2022-04-15-11-29-38.gh-issue-91539.7WgVuA.rst
Co-authored-by: Carl Meyer <[email protected]>
* Update Lib/urllib/request.py
Co-authored-by: Carl Meyer <[email protected]>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Carl Meyer <[email protected]>
(cherry picked from commit aeb28f5)
Co-authored-by: Pieter Eendebak <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Sorry, I can't merge this PR. Reason: Head branch was modified. Review and try the merge again..
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This is a perf optimization, currently we're accepting changes for 3.11.1+ which are bug fixes only. Therefore, this change cannot be included in 3.11.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I was wondering whether this will be merged at some point? It seems to be included in latest python 3.10 but not latest 3.11, if I saw it correctly.
Thanks
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
so sad this fix was merged in master and merged in 3.10 but the merged in 3.11 was blocked for no reason :( :( :(
requests is using this urllib get_proxies_environment function to get proxy settings on every HTTP request.
when you install packages with pip install xxx, about 5% of the run time is just fetching proxy settings again and again through this function.

|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.