GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@miss-islington miss-islington commented Oct 5, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • 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]

  • Issue: speed up urllib.request.getproxies_environment #91539

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@eendebakpt @miss-islington
pythongh-91539: improve performance of get_proxies_environment (pytho…
24d2650
…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]>
@bedevere-bot bedevere-bot mentioned this pull request Oct 5, 2022
gh-91539: improve performance of get_proxies_environment #91566
Merged
@bedevere-bot bedevere-bot added the awaiting review label Oct 5, 2022
orsenthil
orsenthil approved these changes Oct 5, 2022
View reviewed changes

@orsenthil orsenthil left a comment

Copy link
Copy Markdown
Member

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.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Oct 5, 2022
@orsenthil
Merge branch '3.11' into backport-aeb28f5-3.11
60f8f19
@miss-islington

miss-islington commented Oct 5, 2022

Copy link
Copy Markdown
Contributor Author

Sorry, I can't merge this PR. Reason: Head branch was modified. Review and try the merge again..

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ambv
Merge branch '3.11' into backport-aeb28f5-3.11
04c1c89
@ambv

ambv commented Oct 5, 2022

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ambv ambv closed this Oct 5, 2022
@miss-islington
miss-islington deleted the backport-aeb28f5-3.11 branch October 5, 2022 22:46
@FrederikP

FrederikP commented Mar 7, 2023

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@morotti

morotti commented Jul 19, 2024

Copy link
Copy Markdown
Contributor

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.

image

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@orsenthil orsenthil orsenthil approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting merge

Projects

None yet

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.

7 participants

@miss-islington @ambv @FrederikP @morotti @orsenthil @bedevere-bot @eendebakpt
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.