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 — Support urllib3 >= 2.0.0 by danigm · Pull Request #1290 · googleapis/google-auth-library-python

This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Conversation

@danigm

@danigm danigm commented May 10, 2023

Copy link
Copy Markdown

The urllib3.request.RequestMethods has been moved to urllib3._request_methods.RequestMethods.

This patch changes the usage to continue working with the latest release, but now it's a "private" class in a "private" module, so maybe it's worth to start to think about updating this code to use the public API.

https://urllib3.readthedocs.io/en/stable/changelog.html#removed

See #1283

Sorry, something went wrong.

Uh oh!

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

pp-akursar reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@danigm
danigm requested review from a team May 10, 2023 07:25
@google-cla

google-cla Bot commented May 10, 2023

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

All reactions

Sorry, something went wrong.

Uh oh!

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

@danigm
danigm force-pushed the urllib3-2 branch from fbe9c7a to 9ed006d Compare May 10, 2023 07:26
@danigm

danigm commented May 10, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Author

The tests are working with this change, but it looks like it also work if instead of using directly the RequestMethods class we use some of the classes that inherit from it, like HTTPConnectionPool: https://urllib3.readthedocs.io/en/stable/reference/urllib3.connectionpool.html#urllib3.HTTPConnectionPool

All reactions

Sorry, something went wrong.

Uh oh!

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

@clundin25

clundin25 commented May 10, 2023

Copy link
Copy Markdown
Contributor

Thank you for the contribution! It will take some time to accept this patch. There are downstream dependencies that depend on this functionality.

All reactions

Sorry, something went wrong.

Uh oh!

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

@pquentin

pquentin commented May 15, 2023

Copy link
Copy Markdown

Hello, urllib3 maintainer here 👋

It's unfortunate that urllib3 has always documented its internals as if they were a public API, because it makes any changes difficult.

Can you please clarify what downstream dependencies depend on exactly?

All reactions

Sorry, something went wrong.

Uh oh!

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

@clundin25

clundin25 commented May 15, 2023

Copy link
Copy Markdown
Contributor

Hi @pquentin,

We use PyOpenSSL to implement non-file based credentials w/ mTLS. We are investigating other approaches but until we have a solution in place we cannot migrate.

Deprecation notice here: urllib3/urllib3#2691

All reactions

Sorry, something went wrong.

Uh oh!

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

@pquentin

pquentin commented May 15, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

OK, so RequestsMethod isn't really an issue, this is good to know. Others have reported that non-file TLS is the only the reason why they still use pyOpenSSL, and it's true that we don't have a good alternative today.

It's only deprecated, not removed, though. Is the issue the deprecation warning? I don't want to be pushy: this is your software. But I'm trying to better understand the blockers.

cthart reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@clundin25

clundin25 commented May 15, 2023

Copy link
Copy Markdown
Contributor

@danigm Let me double check. My assumption is that we do not want the deprecation warning to propagate.

I appreciate the effort / time to update this for us!

All reactions

Sorry, something went wrong.

Uh oh!

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

@arithmetic1728

arithmetic1728 commented May 15, 2023

Copy link
Copy Markdown
Contributor

RequestsMethod is one reason. Another reason (as @clundin25 mentioned) is that urllib3 will remove pyopenssl support in v2.1.0. For v2.0.0 it currently just raises a warning but that could bother the users, so we would like to keep urllib3 < 2.0 for now until we find a good way to handle both issues.

pquentin reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request May 19, 2023
dgarcia @bmwiedemann
Update python-google-auth to version 2.17.3 / rev 30 via SR 1085995
667a4a7
https://build.opensuse.org/request/show/1085995
by user dgarcia + dimstar_suse
- Add urllib3-2.patch to support newer urllib3 -- gh#googleapis/google-auth-library-python#1290
- Remove no-python3.patch
- Update to 2.17.3:
  * Add useEmailAzp claim for id token iam flow (#1270) (7a9c6f2)
- 2.17.2:
  * Do not create new JWT credentials if they make the same claims as
    the existing. (#1267) (eebb7b6)
- 2.17.1:
  * Print out reauth plugin error and raise if challenge output is
    None (#1265) (08d22fe)
- 2.17.0:
  * Experimental service account iam endpoint flow for id token
    (#1258) (8ff0de5)
  * Python: Remove aws url validation (#1254) (20a966b)
- 2.16.3:
  * Read both applicationId and relyingPartyId. (#1246) (e125dfe)
- 2.16.2:
  * Call gcloud config get project to get project for user cred
    (#1243) (c078a13)
  * Do not use hardcoded string 'python', when yo
@olivi-eh olivi-eh mentioned this pull request May 23, 2023
chore(deps): update dependency urllib3 to v2 - abandoned GoogleCloudPlatform/microservices-demo#1732
Closed
1 task
@meredithslota meredithslota mentioned this pull request May 29, 2023
chore(deps): update all dependencies googleapis/python-bigquery#1560
Merged
1 task
@olivi-eh olivi-eh mentioned this pull request May 30, 2023
chore(deps): update dependency google-auth to v2.22.0 GoogleCloudPlatform/bank-of-anthos#1519
Closed
1 task
@tellett tellett mentioned this pull request Jun 7, 2023
Cannot setup new virtual environment GoogleCloudPlatform/artifact-registry-python-tools#45
Open
@mgorny

mgorny commented Jun 14, 2023

Copy link
Copy Markdown

Thanks for the patch. I'm going to take it into Gentoo to let us unblock urllib3-2.

All reactions

Sorry, something went wrong.

Uh oh!

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

gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Jun 14, 2023
@mgorny
dev-python/google-auth: Apply patch for urllib3-2 compatibility
a50bfe9
Bug: googleapis/google-auth-library-python#1290
Signed-off-by: Michał Górny <[email protected]>
@ralgozino ralgozino mentioned this pull request Jul 27, 2023
chore(deps): bump google-auth from 2.17.3 to 2.22.0 in /app sighupio/gatekeeper-policy-manager#769
Closed
@JoranAngevaare JoranAngevaare mentioned this pull request Aug 16, 2023
Bump urllib3 from 1.26.16 to 2.0.4 JoranAngevaare/optim_esm_base#158
Closed
@meredithslota meredithslota mentioned this pull request Aug 18, 2023
chore(deps): update all dependencies googleapis/python-bigquery-sqlalchemy#899
Merged
1 task
@pquentin

pquentin commented Sep 14, 2023

Copy link
Copy Markdown

@arithmetic1728 @clundin25 I have discussed this with the other urllib3 maintainers and we're going to undeprecate pyOpenSSL. We won't add the deprecation and warning back unless there's a good solution for this problem (like a third-party library or a fix in CPython itself).

Would that be enough for you to upgrade?

All reactions

Sorry, something went wrong.

Uh oh!

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

@arithmetic1728

arithmetic1728 commented Sep 14, 2023

Copy link
Copy Markdown
Contributor

@pquentin This is great news! Which release will pyopenssl support be back?

The only thing left to update urllib3 would be RequestsMethod, we might want let our AuthorizedHttp class inherit urllib3._request_methods.RequestMethods as in https://github.com/googleapis/google-auth-library-python/pull/1290/files. Is urllib3 planning to change urllib3._request_methods.RequestMethods in the future?

All reactions

Sorry, something went wrong.

Uh oh!

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

@sethmlarson

sethmlarson commented Sep 16, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

@arithmetic1728 Happy to hear you're willing to migrate! 🥳 I opened an issue to remove the deprecation warning for pyOpenSSL.

The RequestMethods class is private, since it's really just a convenience class for us to not need to reimplement all the logic around .request() for all the different layers (PoolManager, ConnectionPool, ProxyManager). You could copy all the relevant code into AuthorizedHttp instead of subclassing? It's mostly shuffling headers and request bodies around.

All reactions

Sorry, something went wrong.

Uh oh!

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

@arithmetic1728

arithmetic1728 commented Sep 18, 2023

Copy link
Copy Markdown
Contributor

@sethmlarson Thank you for the suggestions. We will upgrade urllib3 once the depreciation message is removed.

ralgozino reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

@pquentin

pquentin commented Sep 20, 2023

Copy link
Copy Markdown

Hello! https://pypi.org/project/urllib3/2.0.5/ is now out without the deprecation warning.

ralgozino, arithmetic1728, and mcoliver reacted with heart emoji
All reactions
  • ❤️ 3 reactions

Sorry, something went wrong.

Uh oh!

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

@arithmetic1728

arithmetic1728 commented Sep 20, 2023

Copy link
Copy Markdown
Contributor

@pquentin awesome. Thank you!

All reactions

Sorry, something went wrong.

Uh oh!

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

@antoni-szych-rtbhouse

antoni-szych-rtbhouse commented Sep 28, 2023

Copy link
Copy Markdown

Seems like this was partially done in #1389, but without fixing the docstrings. Maybe @danigm can rebase this PR to master in order to fix the outdated docstrings?

All reactions

Sorry, something went wrong.

Uh oh!

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

@danigm
Support urllib3 >= 2.0.0
4802f2f
The urllib3.request.RequestMethods has been moved to
urllib3._request_methods.RequestMethods.

This patch changes the usage to continue working with the latest
release, but now it's a "private" class in a "private" module, so maybe
it's worth to start to think about updating this code to use the public
API.

https://urllib3.readthedocs.io/en/stable/changelog.html#removed
@danigm
danigm force-pushed the urllib3-2 branch from 9ed006d to 4802f2f Compare September 28, 2023 08:25
pquentin
pquentin approved these changes Nov 3, 2023
View reviewed changes
@chalmerlowe
Merge branch 'main' into urllib3-2
f163445
@chalmerlowe
chalmerlowe requested a review from a team December 22, 2025 16:38
@chalmerlowe
Merge branch 'main' into urllib3-2
6044e3d
chalmerlowe pushed a commit that referenced this pull request Dec 23, 2025
@google-labs-jules
docs: update urllib3 RequestMethods docstrings for v2 compatibility
01d1336
The `urllib3.request` module was removed in urllib3 v2.0.0, and `RequestMethods` was moved to a private module `urllib3._request_methods`.

This commit updates the docstrings in `google/auth/transport/urllib3.py` to remove references to the now-private `urllib3.request.RequestMethods` class. Instead, it references the public `urllib3.PoolManager` class or the generic request interface, ensuring the documentation remains accurate for both urllib3 v1 and v2 users.

This addresses the documentation aspect of PR #1290.
@chalmerlowe chalmerlowe mentioned this pull request Dec 23, 2025
docs: update urllib3 docstrings for v2 compatibility #1903
Merged
@chalmerlowe

chalmerlowe commented Dec 23, 2025

Copy link
Copy Markdown
Contributor

Thank you for issuing this.

Closing this in deference to the fact that some of these changes have been made over time in other PRs. In addition, an update to the docstrings has been provided in PR #1903.

All reactions

Sorry, something went wrong.

Uh oh!

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

@chalmerlowe chalmerlowe closed this Dec 23, 2025
chalmerlowe added a commit that referenced this pull request Dec 26, 2025
@google-labs-jules @chalmerlowe
docs: update urllib3 docstrings for v2 compatibility (#1903)
3f1aeea
Updates docstrings in `google/auth/transport/urllib3.py` to reference
`urllib3.PoolManager` instead of the removed/private
`urllib3.request.RequestMethods`, ensuring compatibility with `urllib3`
v2 documentation standards.

NOTE: This PR supercedes an [older PR
#1290](#1290),
because some of the content or suggested changes in the older PR are
overtaken by events and/or been incorporated via [other recent
PRs](#1389).

---
*PR created automatically by Jules for task
[17649723998293325458](https://jules.google.com/task/17649723998293325458)
started by @chalmerlowe*

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Chalmer Lowe <[email protected]>
parthea pushed a commit to googleapis/google-cloud-python that referenced this pull request Mar 2, 2026
@google-labs-jules @chalmerlowe
docs: update urllib3 docstrings for v2 compatibility (#1903)
6f07d22
Updates docstrings in `google/auth/transport/urllib3.py` to reference
`urllib3.PoolManager` instead of the removed/private
`urllib3.request.RequestMethods`, ensuring compatibility with `urllib3`
v2 documentation standards.

NOTE: This PR supercedes an [older PR
#1290](googleapis/google-auth-library-python#1290),
because some of the content or suggested changes in the older PR are
overtaken by events and/or been incorporated via [other recent
PRs](googleapis/google-auth-library-python#1389).

---
*PR created automatically by Jules for task
[17649723998293325458](https://jules.google.com/task/17649723998293325458)
started by @chalmerlowe*

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Chalmer Lowe <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@pquentin pquentin pquentin approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

8 participants

@danigm @clundin25 @pquentin @arithmetic1728 @mgorny @sethmlarson @antoni-szych-rtbhouse @chalmerlowe
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 01402775 — 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.