FS#62592 - [python-requests] spews warning with urllib3 > 1.24
Attached to Project:
Arch Linux
Opened by David McInnis (daavve) - Friday, 10 May 2019, 14:15 GMT
Last edited by Felix Yan (felixonmars) - Thursday, 16 May 2019, 19:01 GMT
Opened by David McInnis (daavve) - Friday, 10 May 2019, 14:15 GMT
Last edited by Felix Yan (felixonmars) - Thursday, 16 May 2019, 19:01 GMT
|
Details
Description: python-requests raises exception if urllib3 not
between versions 1.21.1 & 1.24. If python-urllib3-1.25
is installed python-requests will always fail with an
exception when it checks urllib3 version.
* package version(s) testing/python-urllib3-1.25.2-1 extra/python-requests 2.21.0-1 * link to upstream bug report, if any https://github.com/kennethreitz/requests/issues/5065 Steps to reproduce: 1) Install package versions Try to use "pip search" $pip search acpilight /usr/lib/python3.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.2) or chardet (3.0.4) doesn't match a supported version! RequestsDependencyWarning) I made a work-around fix by manually changing __init__.py in the pkbuild to the following: $ diff src/requests-2.21.0/requests/__init__.py ../src/requests-2.21.0/requests/__init__.py 60c60 < # urllib3 >= 1.21.1, <= 1.24 --- > # urllib3 >= 1.21.1, <= 1.25 63c63 < assert minor <= 24 --- > assert minor <= 25 # Now at least "pip search" works for me. Wasn't able to get the PKGBUILD check() to run properly though. -Dave |
This task depends upon
Closed by Felix Yan (felixonmars)
Thursday, 16 May 2019, 19:01 GMT
Reason for closing: Fixed
Additional comments about closing: 2.22.0-1
Thursday, 16 May 2019, 19:01 GMT
Reason for closing: Fixed
Additional comments about closing: 2.22.0-1
The above patch might come in handy as a workaround for any package that breaks due to the handling of the warning exception.
On the other hand, it's still an issue, even if just a warning (and I'm not sure it is just that, or not).
I'm aware this isn't a direct breakage and is a potential flaw in `streamlink-twitch-gui`'s way to handle `streamlink`, because this possibility isn't considered, and I'm going to submit a ticket and their repo.
https://github.com/streamlink/streamlink/issues/2448
https://github.com/streamlink/streamlink/issues/2446
Different applications handle exceptions differently when using the python-requests package. Therefore, individual dependent packages may or may not be effected.
-Dave
Attached patch almost gets requests to build, including passing the testsuite with pytest 4, except for one failing test in which requests failed to raise a SubjectAltNameWarning when it thought it should. This is a general issue with trying to rebuild requests regardless of urllib3 version.
Thank you Eli, I'm glad to see a fix is almost done!
Should have been fixed in 2.22.0-1. Sorry for the delay.