I'm getting the following error and traceback with latest python3-requests and python3 on F19: Traceback (most recent call last): File "/usr/lib/python3.3/site-packages/requests/sessions.py", line 310, in get return self.request('GET', url, **kwargs) File "/usr/lib/python3.3/site-packages/requests/sessions.py", line 279, in request resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies) File "/usr/lib/python3.3/site-packages/requests/sessions.py", line 374, in send r = adapter.send(request, **kwargs) File "/usr/lib/python3.3/site-packages/requests/adapters.py", line 219, in send r = self.build_response(request, resp) File "/usr/lib/python3.3/site-packages/requests/adapters.py", line 106, in build_response extract_cookies_to_jar(response.cookies, req, resp) File "/usr/lib/python3.3/site-packages/requests/cookies.py", line 105, in extract_cookies_to_jar jar.extract_cookies(res, req) File "/usr/lib64/python3.3/http/cookiejar.py", line 1647, in extract_cookies if self._policy.set_ok(cookie, request): File "/usr/lib64/python3.3/http/cookiejar.py", line 931, in set_ok if not fn(cookie, request): File "/usr/lib64/python3.3/http/cookiejar.py", line 952, in set_ok_verifiability if request.unverifiable and is_third_party(request): File "/usr/lib64/python3.3/http/cookiejar.py", line 707, in is_third_party if not domain_match(req_host, reach(request.origin_req_host)): AttributeError: 'MockRequest' object has no attribute 'origin_req_host' Upstream, this error is noted at https://github.com/kennethreitz/requests/issues/1379 The upstream recommendation is to upgrade to Requests to 1.2.1 or later. Can we rebase to the latest release 1.2.3?
For visitors looking for an insecure hack to work around this, try adding the following code to your application: # https://github.com/kennethreitz/requests/issues/1379 import http.cookiejar http.cookiejar.is_third_party = lambda request: False
Sure, let's give it a try. So many things rely on python-requests... I'll try to let it sit in updates-testing a little longer than usual.
python-requests-1.2.3-2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/python-requests-1.2.3-2.fc19
Oh dear, this isn't good. Trying python3-requests-1.2.3-2.fc19, I've found that it's not automatically un-gzipping content received from remote servers like it used to. Given (as Ralph mentioned) the number of people relying on python-requests, I think that's a show-stopper. The issue is down to a combination of: (a) commit https://github.com/kennethreitz/requests/commit/59f916ca4a6a8e55528988cfc1bee445e71c4602 removing functionality in favour of using urllib3 instead, and (b) the replacement urllib3 functionality being broken in the version of urllib3 that we currently ship. Specifically, in HTTPResponse.read(), ... if amt is None: # cStringIO doesn't like amt=None data = self._fp.read() else: return self._fp.read(amt) try: if decode_content and decoder: data = decoder(data) except (IOError, zlib.error): ... the return statement shouldn't be there as it prevents the gzip decoder from running. This is fixed upstream (I've checked that python3-pip install --upgrade urllib3 makes things act as expected). I'd now suggest the following: - for F20, rebase python3-requests /and/ python3-urllib to latest upstream - for F19, reject python3-requests-1.2.3-2, and do one of the following, depending on appetite for risk: - rebase python3-requests /and/ python3-urllib to latest upstream, OR - try rebasing python3-requests ONLY to 1.2.1 or 1.2.2 (thus missing the commit mentioned above), OR - do nothing!
Well, as long as the updates for python3-requests and python3-urllib go out together.. and as long as we keep them in updates-testing for a hefty amount of time: I think I'm ok with updating them both to the latest upstream in F19.
python-urllib3-1.7-1.fc19,python-requests-1.2.3-3.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/python-urllib3-1.7-1.fc19,python-requests-1.2.3-3.fc19
Tested and all works for me -- thanks! I wonder if it might be worth putting Requires: python-urllib3 >= 1.7 and Requires: python3-urllib3 >= 1.7 in the relevant parts of the requests spec file?
Yes, that sounds smart.
python-urllib3-1.7-2.fc19,python-requests-1.2.3-4.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/python-urllib3-1.7-2.fc19,python-requests-1.2.3-4.fc19
python-requests-1.2.3-5.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/python-requests-1.2.3-5.fc19
python-urllib3-1.7-3.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/python-urllib3-1.7-3.fc19
All works for me. I'll report back if I encounter any issues with the new RPMs. Thanks again.
python-urllib3-1.7-3.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
python-requests-1.2.3-5.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.