Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-91539: improve performance of get_proxies_environment #91566

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

Merged
merged 26 commits into from
Oct 5, 2022
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
42118e3
improve performance of get_proxies_environment when there are many en…
eendebakpt Apr 15, 2022
37ff8d9
📜🤖 Added by blurb_it.
blurb-it[bot] Apr 15, 2022
b8de962
fix case of short env name
eendebakpt Apr 15, 2022
0f90945
Merge branch 'performance/getproxies_environment' of githubeendebakpt…
eendebakpt Apr 15, 2022
336da07
fix formatting
eendebakpt Apr 15, 2022
cabeb47
fix whitespace
eendebakpt Apr 15, 2022
c581748
whitespace
eendebakpt Apr 15, 2022
4217396
Merge branch 'main' into performance/getproxies_environment
eendebakpt May 11, 2022
0055604
Merge branch 'main' into performance/getproxies_environment
eendebakpt May 13, 2022
869fa9a
Merge branch 'main' into performance/getproxies_environment
eendebakpt May 17, 2022
dba0414
Update Lib/urllib/request.py
eendebakpt May 18, 2022
76f16ca
Update Lib/urllib/request.py
eendebakpt May 18, 2022
d3feb07
Update Lib/urllib/request.py
eendebakpt May 18, 2022
b9ab037
Update Lib/urllib/request.py
eendebakpt May 18, 2022
f961505
whitespace
eendebakpt May 18, 2022
36e5497
Update Misc/NEWS.d/next/Library/2022-04-15-11-29-38.gh-issue-91539.7W…
eendebakpt May 18, 2022
ca4fbd4
Update Lib/urllib/request.py
eendebakpt May 18, 2022
77cceab
Merge branch 'main' into performance/getproxies_environment
eendebakpt May 31, 2022
9687ebb
Merge branch 'main' into performance/getproxies_environment
eendebakpt Jun 12, 2022
3bf6f63
Merge branch 'main' into performance/getproxies_environment
eendebakpt Jun 24, 2022
fc36faa
Merge branch 'main' into performance/getproxies_environment
eendebakpt Jul 2, 2022
b6d866f
Merge branch 'main' into performance/getproxies_environment
eendebakpt Jul 16, 2022
f40e0dc
Merge branch 'main' into performance/getproxies_environment
eendebakpt Jul 26, 2022
41410da
Merge branch 'main' into performance/getproxies_environment
eendebakpt Aug 2, 2022
41b72c6
Merge branch 'main' into performance/getproxies_environment
eendebakpt Sep 11, 2022
9db1103
Merge branch 'main' into performance/getproxies_environment
eendebakpt Sep 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix case of short env name
  • Loading branch information
eendebakpt committed Apr 15, 2022
commit b8de96294e5c1b97f871266e4686318563bcf7cf
2 changes: 1 addition & 1 deletion 2 Lib/urllib/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -2501,7 +2501,7 @@ def getproxies_environment():
# two passes: first matches any, second pass matches lowercase only

# select only environment variables which end in (after making lowercase) _proxy
candidate_names = [name for name in os.environ.keys() if name[-6:]=='_'] # fast selection of candidates
candidate_names = [name for name in os.environ.keys() if len(name)>5 and name[-6]=='_'] # fast selection of candidates
environment = [(name, os.environ[name], name.lower()) for name in candidate_names if name[-6:].lower()=='_proxy']

proxies = {}
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.