Bug 1214365
| Summary: | Update the version of python-requests that ships with 7.x to 2.6.x | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Keith Robertson <kroberts> |
| Component: | python-requests | Assignee: | Python Maintainers <python-maint> |
| Status: | CLOSED DUPLICATE | QA Contact: | Branislav NĂ¡ter <bnater> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.2 | CC: | akrherz, hartsjc, isenfeld, jamills, jberan, jmoran, lmiksik, lsmid, mkosek, python-maint, richard.cunningham, sdodson, snagar, torsava |
| Target Milestone: | rc | Keywords: | Rebase |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | python-requests-2.6.0-4.el7 | Doc Type: | Rebase: Bug Fixes and Enhancements |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-07-12 14:42:05 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1226899, 1226901, 1226934, 1232882, 1232884, 1233112, 1233113 | ||
| Bug Blocks: | 1181710, 1212207, 1232879 | ||
|
Description
Keith Robertson
2015-04-22 14:38:28 UTC
*** Bug 1168076 has been marked as a duplicate of this bug. *** It looks like python-requests already ships with RHEL 7.x[1]. Therefore, this BZ will be reworded so that it is clear that we are rebasing python-requests in RHEL 7.x to 2.6.x. [1] https://brewweb.devel.redhat.com/buildinfo?buildID=322639 This breaks my RHEL 7.2 host, downgrading to python-requests-1.1.0-8.el7 resolves the issue.
$ rpm -q python-requests python-urllib3
python-requests-2.6.0-4.el7.noarch
python-urllib3-1.10.2-1.el7.noarch
$ python -c 'import requests'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 60, in <module>
from .api import request, get, head, post, patch, put, delete, options
File "/usr/lib/python2.7/site-packages/requests/api.py", line 14, in <module>
from . import sessions
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 27, in <module>
from .adapters import HTTPAdapter
File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 29, in <module>
from .packages.urllib3.exceptions import ResponseError
ImportError: cannot import name ResponseError
$ rpm -q python-requests python-urllib3
python-requests-1.1.0-8.el7.noarch
python-urllib3-1.10.2-1.el7.noarch
$ python -c 'import requests'
$
(In reply to Scott Dodson from comment #6) > This breaks my RHEL 7.2 host, downgrading to python-requests-1.1.0-8.el7 > resolves the issue. > > $ rpm -q python-requests python-urllib3 > python-requests-2.6.0-4.el7.noarch > python-urllib3-1.10.2-1.el7.noarch > > $ python -c 'import requests' > Traceback (most recent call last): > File "<string>", line 1, in <module> > File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 60, in > <module> > from .api import request, get, head, post, patch, put, delete, options > File "/usr/lib/python2.7/site-packages/requests/api.py", line 14, in > <module> > from . import sessions > File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 27, in > <module> > from .adapters import HTTPAdapter > File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 29, in > <module> > from .packages.urllib3.exceptions import ResponseError > ImportError: cannot import name ResponseError > > $ rpm -q python-requests python-urllib3 > python-requests-1.1.0-8.el7.noarch > python-urllib3-1.10.2-1.el7.noarch > $ python -c 'import requests' > $ Are the RPMs identified in these 3 errata installed on the box? python-chardet - https://errata.devel.redhat.com/advisory/20881 python-urllib3 - https://errata.devel.redhat.com/advisory/20876 python-requests - https://errata.devel.redhat.com/advisory/20447 I wager a guess you have an old version of urllib3 somewhere, somehow. Could you please run these commands and let me know what the output is? % ls /usr/lib/python2.7/site-packages/requests/packages/ % grep __version__ /usr/lib/python2.7/site-packages/urllib3/__init__.py $ ls /usr/lib/python2.7/site-packages/requests/packages/ chardet __init__.py __init__.pyc __init__.pyo urllib3 $ grep __version__ /usr/lib/python2.7/site-packages/urllib3/__init__.py __version__ = '1.10.2' $ rpm -q python-urllib3 python-requests python-chardet python-urllib3-1.10.2-1.el7_1.noarch python-requests-2.6.0-4.el7.noarch python-chardet-2.2.1-1.el7_1.noarch $ rpm -Va python-urllib3 python-requests python-chardet $ pip freeze | grep -e urllib -e requests -e chardet chardet==2.2.1 requests==2.6.0 urllib2-kerberos==0.1.6 urllib3==1.10.2 Anything else I can check? If this works on a clean install of 7.2 I'm fine with assuming it's something messed up with my system but all of the packages verify and they're fully up to date with 7.2 nightlies. (In reply to Scott Dodson from comment #9) > $ ls /usr/lib/python2.7/site-packages/requests/packages/ > chardet __init__.py __init__.pyc __init__.pyo urllib3 This right here is likely the culprit. The directory shouldn't contain 'chardet' and, more importantly, 'urllib3' as I do the following in the python-requests .spec file: # Unbundle chardet and urllib3. rm -rf build/lib/requests/packages/chardet rm -rf build/lib/requests/packages/chardet What you have there is likely an older version of urllib3 that does not contain ResponseError. The way requests are made, they look for urllib3 first in the packages directory and only then do they look for the system module. Obviously this shouldn't happen, unless you've done something non-standard. I'll investigate. Scott, do you happen to remember what version of requests you've had installed, and from what product, before updating to 2.6.0? I've tried going from 1.1.0-8_el7 to 2.6.0-4_el7 and everything seems to be working fine. I'm gonna guess whatever version it was, it did not unbundle those modules. (In reply to Matej Stuchlik from comment #11) > Scott, do you happen to remember what version of requests you've had > installed, and from what product, before updating to 2.6.0? I've tried going > from 1.1.0-8_el7 to 2.6.0-4_el7 and everything seems to be working fine. > > I'm gonna guess whatever version it was, it did not unbundle those modules. Matej, The only RPM version I've had previously was python-requests-1.1.0-8.el7.noarch, at least as far back as yum history reports. I've had to install nova client using pip so it's potentially a side effect of that. Cleaning out the packages resolved the issue. Sorry for the disruption. Hello, I am curious about the status of this bugzilla. The fix version notes: python-requests-2.6.0-4.el7 My RHEL7.2 workstation box has: Source RPM : python-requests-2.6.0-1.el7_1.src.rpm Build Date : Wed 24 Jun 2015 06:45:25 AM CDT Build Host : ppc-020.build.eng.bos.redhat.com Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> Vendor : Red Hat, Inc. |