Bug 1785607
Summary: | Package packages is no longer available - import produces AttributeError | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Pavol Babinčák <pbabinca> | |
Component: | python-requests | Assignee: | Charalampos Stratakis <cstratak> | |
Status: | CLOSED ERRATA | QA Contact: | RHEL CS Apps Subsystem QE <rhel-cs-apps-subsystem-qe> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | high | |||
Version: | 7.7 | CC: | cstratak, hhorak, jcastran, jesusr, jhouska, pviktori, python-maint, redhat, sbradley, wchadwic | |
Target Milestone: | rc | Keywords: | ZStream | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | python-requests-2.6.0-10.el7 | Doc Type: | No Doc Update | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1811048 1811049 1811050 1811051 (view as bug list) | Environment: | ||
Last Closed: | 2020-09-29 19:39:41 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: | ||||
Bug Blocks: | 1811048, 1811049, 1811050, 1811051 |
Description
Pavol Babinčák
2019-12-20 12:43:47 UTC
While this was probably never a documented API, it is indeed used in the wild and removing it breaks things. Upstream added this hideous hack to have it back: https://github.com/psf/requests/blob/v2.18.0/requests/packages.py We are planning to make `import requests.packages` possible and safe. However, `import requests; requests.packages` will not be possible without significant slowdown for everyone who imports requests. Will that be OK for you? The code seems fixed on your side. (In reply to Petr Viktorin from comment #5) > We are planning to make `import requests.packages` possible and safe. > However, `import requests; requests.packages` will not be possible without > significant slowdown for everyone who imports requests. > > Will that be OK for you? The code seems fixed on your side. I guess it is your call. I cannot speak for everyone. We had the same issue: code breaking because requests.packages.urllib3.disable_warnings() was suddenly no longer available after an upgrade. It took me a long time to find this bug report. Is this at al related to https://access.redhat.com/errata/RHBA-2020:0781 ? Because it looks like it is fixed now. Yes, RHBA-2020:0781 has the fix for RHEL 7.5, 7.6 and 7.7. This bug tracks inclusion of the fix in future RHEL7 versions. VERIFIED NEW PASS: python-requests-2.6.0-10.el7.noarch # rpm -qa python-requests python-requests-2.6.0-10.el7.noarch # python -c 'import requests; requests.packages' # echo $? 0 OLD FAIL: python-requests-2.6.0-8.el7_7.noarch # rpm -qa python-requests python-requests-2.6.0-8.el7_7.noarch # python -c 'import requests; requests.packages' Traceback (most recent call last): File "<string>", line 1, in <module> AttributeError: 'module' object has no attribute 'packages' # echo $? 1 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (python-requests bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:3886 |