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

urllib3 v1.25 support #5067

Closed
EpicWink opened this issue Apr 23, 2019 · 15 comments
Closed

urllib3 v1.25 support #5067

EpicWink opened this issue Apr 23, 2019 · 15 comments

Comments

@EpicWink
Copy link

EpicWink commented Apr 23, 2019

Support for urllib3 v1.25 (released today/yesterday). The usual yada-yada "my CI is broken".

Multiple packages that we depend on (eg google.cloud.storage, azure.storage) have strict version-check on requests using pkg_resources.require('requests >= 2.18.0'). Any unmet dependencies in the chain below and including requests will cause the check to fail and raise an exception. urllib3<1.25 is currently one such dependency.

Expected Result

No exception raised on import

Actual Result

pkg_resources.ContextualVersionConflict: (urllib3 1.25 (/usr/local/lib/python3.6/dist-packages), Requirement.parse('urllib3<1.25,>=1.21.1'), {'requests'})

The above exception was the direct cause of the following exception:
ImportError: ``requests >= 2.18.0`` is required by the ``google.resumable_media.requests`` subpackage.
It can be installed via
    pip install google-resumable-media[requests].

Reproduction Steps

pip3 install sentry-sdk google-cloud-storage
>>> from google.cloud import storage

System Information

/home/laurie/env-tmp/lib/python3.6/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
{
  "chardet": {
    "version": "3.0.4"
  },
  "cryptography": {
    "version": ""
  },
  "idna": {
    "version": "2.8"
  },
  "implementation": {
    "name": "CPython",
    "version": "3.6.7"
  },
  "platform": {
    "release": "4.18.0-17-generic",
    "system": "Linux"
  },
  "pyOpenSSL": {
    "openssl_version": "",
    "version": null
  },
  "requests": {
    "version": "2.21.0"
  },
  "system_ssl": {
    "version": "1010100f"
  },
  "urllib3": {
    "version": "1.25"
  },
  "using_pyopenssl": false
}
@EpicWink
Copy link
Author

Note that a pull-request fixing this should close #5065 and #4961

@EpicWink
Copy link
Author

Also note that a solution to the above reproduction example is:

pip3 install sentry-sdk google-cloud-storage 'urllib3<1.25'

@Freso
Copy link

Freso commented Apr 24, 2019

There’s already a PR in the works: https://github.com/kennethreitz/requests/pull/5063

winged referenced this issue in winged/caluma Apr 25, 2019
We're listing dependencies alphabetically. This causes pip to
resolve minio urllib3 dependency (which has an unspecified version)
before requests (which pins it to below 1.25), causing a version
mismatch.

This is a workaround that should be removed once
https://github.com/kennethreitz/requests/issues/5067 is resolved
winged referenced this issue in winged/caluma Apr 25, 2019
We're listing dependencies alphabetically. This causes pip to
resolve minio urllib3 dependency (which has an unspecified version)
before requests (which pins it to below 1.25), causing a version
mismatch.

This is a workaround that should be removed once
https://github.com/kennethreitz/requests/issues/5067 is resolved
fenhl referenced this issue in fenhl/syncbin Apr 25, 2019
@EpicWink
Copy link
Author

To those watching, as mentioned, we're blocked on urllib3 v1.25.2

@sethmlarson
Copy link
Member

sethmlarson commented Apr 29, 2019

@nateprewitt FYI 1.25.2 will be released very soon, I would recommend in addition to disallowing 1.25.0 also disallow 1.25.1?

@rkooo567
Copy link

Our CI pipeline starts to get an error [integration_py3_docker_metric] 19-04-29:10:26:57 ERROR [clipper_metric_docker.py:127] Failed to parse: http://localhost:44328/api/v1/series?match[]=clipper_mc_parse_time_ms_sum from April 22nd, from when urllib3 version 1.25 was released. Do you think this is related to this issue?

@EpicWink
Copy link
Author

@rkooo567, have you tried running the CI with the additional requirement urllib3<1.25?

@rkooo567
Copy link

@EpicWink Yes. And it seems like it resolves an issue. I also found out urllib3==1.25.2 also resolves the problem.

@sethmlarson
Copy link
Member

urllib3 1.24.3 has been released which fixes only the CRLF injection issue for 1.24.X users.

@plowman
Copy link

plowman commented May 9, 2019

Here's a possibly dumb question: why does requests restrict urllib3 to be < 1.25? Since many other pip dependencies are going to continue to increase their minimum allowed urllib3 version, it seems like this is going to guarantee two things:

  1. Every minor version bump in urllib3 will break many projects which depend on requests (e.g. anyone who is using the major Google or Microsoft Azure packages, among many others).
  2. Every minor version bump in urllib3 will then require a new release of requests to allow the new version of urllib3.

Does urllib3 make breaking changes that often that we're worried about just trusting their versioning? Or is there another concern?

@Freso
Copy link

Freso commented May 15, 2019

Based on the number of references to this issue in other projects’ trackers, I’m sure there are a lot of other project maintainers that would appreciate a resolution to this sooner rather than later… :) (Pointing it out since issue references don’t trigger e‐mail notifications.)

@tucked
Copy link

tucked commented May 15, 2019

+1 because it aggravates problems caused by Pip's lack of a dependency resolver in some cases: pradyunsg/zazo#14

@prometheanfire
Copy link

If you think that's fun, look at all the things that use requests and can't update urllib3. (we do some manual checking)

http://logs.openstack.org/36/658636/3/check/requirements-tox-py27-check-uc/48d2334/job-output.txt.gz#_2019-05-14_06_33_55_887702

@nateprewitt nateprewitt mentioned this issue May 15, 2019
openstack-gerrit referenced this issue in openstack/requirements May 16, 2019
The following are held back for the reasons noted below:

-grpcio===1.20.1
+grpcio===1.15.0
  tooz has a cap that needs to be removed (most likely)
-SQLAlchemy===1.3.3
+SQLAlchemy===1.2.18
  general breakage in tempest-full https://review.opendev.org/651591
-urllib3===1.25.2
+urllib3===1.24.3
  requests has a cap, they don't seem to care
  https://github.com/kennethreitz/requests/issues/5067
-tornado===5.1.1;python_version=='2.7'
+tornado===4.5.3;python_version=='2.7'
  we generate the wrong version for py27
-kubernetes===9.0.0
+kubernetes===8.0.1
  openshift has a hard lock on ~8
-jsonschema===3.0.1
+jsonschema===2.6.0
  caps in the following, all are openstack, so we just need to make sure
  they have been uncapped and schedule releases
  python-ironiclient tempest taskflow python-zaqarclient warlock
  python-solumclient glance-store python-designateclient os-net-config

Change-Id: I48a34d95e6b831c557ed3bb4bab00e6af3d74dbc
openstack-gerrit referenced this issue in openstack/openstack May 16, 2019
* Update requirements from branch 'master'
  - Updated from generate-constraints
    
    The following are held back for the reasons noted below:
    
    -grpcio===1.20.1
    +grpcio===1.15.0
      tooz has a cap that needs to be removed (most likely)
    -SQLAlchemy===1.3.3
    +SQLAlchemy===1.2.18
      general breakage in tempest-full https://review.opendev.org/651591
    -urllib3===1.25.2
    +urllib3===1.24.3
      requests has a cap, they don't seem to care
      https://github.com/kennethreitz/requests/issues/5067
    -tornado===5.1.1;python_version=='2.7'
    +tornado===4.5.3;python_version=='2.7'
      we generate the wrong version for py27
    -kubernetes===9.0.0
    +kubernetes===8.0.1
      openshift has a hard lock on ~8
    -jsonschema===3.0.1
    +jsonschema===2.6.0
      caps in the following, all are openstack, so we just need to make sure
      they have been uncapped and schedule releases
      python-ironiclient tempest taskflow python-zaqarclient warlock
      python-solumclient glance-store python-designateclient os-net-config
    
    Change-Id: I48a34d95e6b831c557ed3bb4bab00e6af3d74dbc
@nateprewitt
Copy link
Member

Resolved with #5092, release is up on pypi now. Thanks again @EpicWink

BoboTiG referenced this issue in nuxeo/nuxeo-drive Jun 17, 2019
* Add requests requirement to bypass a bug with old version and urllib3 >= 1.25;
  (see https://github.com/kennethreitz/requests/issues/5067)
* Remove pip 18 requirement, there is no more issue here.
BoboTiG referenced this issue in nuxeo/nuxeo-drive Jun 17, 2019
* Add requests requirement to bypass a bug with old version and urllib3 >= 1.25;
  (see https://github.com/kennethreitz/requests/issues/5067)
* Use a development branch of PyInstaller to bypass a vevn bug;
  (see pyinstaller/pyinstaller#3942)
* Remove pip 18 requirement, there is no more issue here.
BoboTiG referenced this issue in nuxeo/nuxeo-drive Jun 17, 2019
* Add requests requirement to bypass a bug with old version and urllib3 >= 1.25;
  (see https://github.com/kennethreitz/requests/issues/5067)
* Use a development branch of PyInstaller to bypass a vevn bug;
  (see pyinstaller/pyinstaller#3942)
* Remove pip 18 requirement, there is no more issue here.

I needed to fix fix_app_qt_folder_names_for_codesign.py as it was yielding
files and folders in a random manner and was trying to fix non-DLL files.
BoboTiG referenced this issue in nuxeo/nuxeo-drive Jun 17, 2019
* Add requests requirement to bypass a bug with old version and urllib3 >= 1.25;
  (see https://github.com/kennethreitz/requests/issues/5067)
* Use a development branch of PyInstaller to bypass a vevn bug;
  (see pyinstaller/pyinstaller#3942)
* Remove pip 18 requirement, there is no more issue here.

I needed to fix fix_app_qt_folder_names_for_codesign.py as it was yielding
files and folders in a random manner and was trying to fix non-DLL files.
BoboTiG referenced this issue in nuxeo/nuxeo-drive Jun 17, 2019
* Add requests requirement to bypass a bug with old version and urllib3 >= 1.25;
  (see https://github.com/kennethreitz/requests/issues/5067)
* Use a development branch of PyInstaller to bypass a vevn bug;
  (see pyinstaller/pyinstaller#3942)
* Remove setuptools and pip 18 requirement, there is no more issue here.
* Fixed fix_app_qt_folder_names_for_codesign.py as it was yielding
  files and folders in a random manner and was trying to fix non-DLL files.
BoboTiG referenced this issue in nuxeo/nuxeo-drive Jun 17, 2019
* Add requests requirement to bypass a bug with old version and urllib3 >= 1.25;
  (see https://github.com/kennethreitz/requests/issues/5067)
* Use a development branch of PyInstaller to bypass a vevn bug;
  (see pyinstaller/pyinstaller#3942)
* Remove setuptools and pip 18 requirement, there is no more issue here.
* Fixed fix_app_qt_folder_names_for_codesign.py as it was yielding
  files and folders in a random manner and was trying to fix non-DLL files.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants