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

Require urllib3 ^1.26.0 #5191

Merged
merged 1 commit into from
Mar 3, 2022
Merged

Require urllib3 ^1.26.0 #5191

merged 1 commit into from
Mar 3, 2022

Conversation

davegaeddert
Copy link
Contributor

@davegaeddert davegaeddert commented Feb 11, 2022

I'm not actually sure how to make a test for this, but in debugging some other issues I found that urllib3 needs to be at least version 1.26.0 to use the allowed_methods parameter on the Retry class:

allowed_methods=["GET"],

Or, it needs to continue using method_whitelist which is deprecated but not going to be removed until urllib3 v2.0... That would probably be safer in terms of restricting the downstream dependencies? Curious what you think. But maybe the restriction is ok considering people aren't screaming about poetry publish failing...

This is where I first saw it.

urllib3                1.25.8
...
   1  ~/.local/lib/python3.8/site-packages/poetry/publishing/uploader.py:106 in make_session
       104│         session.headers["User-Agent"] = self.user_agent
       105│         for scheme in ("http://", "https://"):
     → 106│             session.mount(scheme, self.adapter)
       107│ 
       108│         return session

  TypeError

  __init__() got an unexpected keyword argument 'allowed_methods'

  at ~/.local/lib/python3.8/site-packages/poetry/publishing/uploader.py:70 in adapter
       66│         return user_agent("poetry", __version__)
       67│ 
       68│     @property
       69│     def adapter(self) -> adapters.HTTPAdapter:
    →  70│         retry = util.Retry(
       71│             connect=5,
       72│             total=10,
       73│             allowed_methods=["GET"],
       74│             status_forcelist=[500, 501, 502, 503],

Probably introduced in #4580.

neersighted
neersighted previously approved these changes Feb 28, 2022
Copy link
Member

@neersighted neersighted left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please rebase this to fix conflicts?

@davegaeddert
Copy link
Contributor Author

@neersighted I rebased and basically ran poetry update... does that include more change than you want on poetry.lock?

@abn abn merged commit ca44640 into python-poetry:master Mar 3, 2022
@davegaeddert davegaeddert deleted the min-urllib3 branch March 4, 2022 16:58
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants