pypa / twine

Utilities for interacting with PyPI

Home Page:https://twine.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not work with urllib3 >= 2.0

reswqa opened this issue · comments

Your Environment

Thank you for taking the time to report an issue.

To more efficiently resolve this issue, we'd like to know some basic information about your system and setup.

  1. Your operating system:

MacOs(13.2.1 (22D68)).

  1. Version of python you are running:
    Python 3.11.2

  2. How did you install twine? Did you use your operating system's package manager or pip or something else?
    pip3 install

  3. Version of twine you have installed (include complete output of):
    1.12.0

  4. Which package repository are you targeting?
    --repository-url https://upload.pypi.org/legacy/

The Issue

twine upload --repository-url https://upload.pypi.org/legacy/ xxx reporting some error:

image

It seems that the param method_whitelist is deprecated at urllib3 v1.26.0 and removed in 2.x, but we only requires urllib3 >= 1.26.0. If I have a 2.x urllib3, there will be a problem.

Steps to Reproduce

Install requests v2.30 and upload some package to PYPI.

You are on a very old version of twine. The latest version, 4.0.2, is in fact compatible with this version of urllib3

There's a detailed discussion of this in #989

I see. Thanks for the quick reply and thanks for sharing the context with me. 👍