Inconsistent urllib3 version requirements between setup.py and __init__.py
See original GitHub issueWith https://github.com/requests/requests/commit/ac944b7439009ffbf7a10dfee35202f1ac090e76 the maximum allowed version of urllib3 in setup.py was increased to 1.23
.
However, in https://github.com/requests/requests/blob/master/requests/__init__.py#L57-L63 the version is still required to be <= 1.22
.
This is a bug since the release of requests 1.23 yesterday: https://pypi.org/project/urllib3/#history
Expected Result
Installation of requests
via pip
should work with urllib3 version 1.23
Actual Result
e.g.
/usr/local/lib/python2.7/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.23) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
ContextualVersionConflict: urllib3 1.23
Reproduction Steps
pip install urllib3==1.23
pip install requests
import requests
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:24 (9 by maintainers)
Top Results From Across the Web
urllib3 (1.9.1) or chardet (2.3.0) doesn't match a supported ...
Two options: either downgrade requests to the version from your OS distribution (see what's available with apt show python-requests ), or ...
Read more >How to Publish an Open-Source Python Package to PyPI
In this step-by-step tutorial, you'll learn how to create a Python package for your project and how to publish it to PyPI, the...
Read more >Changelog - pip documentation v22.3.1
Deprecate installation with 'setup.py install' when no-binary is enabled for source ... Allow using a pre-release version to satisfy a build requirement.
Read more >pip's dependency resolver does not currently take into account ...
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the...
Read more >Specifying dependencies in Python | Cloud Functions ...
Private dependencies from other repositories · Copy your dependency into a local directory: pip install -t. DIRECTORY DEPENDENCY · Add an empty __init__.py...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I totally understand the motivation of this design decision to generate warnings on untested
urllib3
versions… but this behavior is definitely breaking in some cases (and not just a warning).Simple test case; create a distribution with an
entry_point
. For example:Create a test program that resolves this entry point (we don’t even have to load it):
Then install the distribution:
This works fine. Even though we have version conflicts,
pip
lets us continue.But then try to ask setuptools to resolve the entry point:
TL/DR; putting an upper bound on
urllib3
versions is breaking for any application that uses entry points in this way and “happens” to upgrade dependencies. That might be your intention, but this behavior definitely goes beyond “warnings” and definitely breaks some workflows (e.g. ours).Here’s how I solved it yesterday:
pip install --upgrade "urllib3==1.22" awscli awsebcli