Debian Bug report logs -
#796356
python-urllib3: broken when python-future is installed, fix available upstream
Reported by: Edward Betts <edward@4angle.com>
Date: Fri, 21 Aug 2015 13:57:06 UTC
Severity: serious
Merged with 797070
Found in version python-urllib3/1.11-1
Fixed in version python-urllib3/1.11-2
Done: Daniele Tricoli <eriol@mornie.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#796356; Package python-urllib3.
(Fri, 21 Aug 2015 13:57:10 GMT) (full text, mbox, link).
Acknowledgement sent
to Edward Betts <edward@4angle.com>:
New Bug report received and forwarded. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>.
(Fri, 21 Aug 2015 13:57:10 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: python-urllib3
Version: 1.11-1
Severity: normal
This version of the package fails to work when python-future is installed.
$ python
Python 2.7.10 (default, Jul 1 2015, 10:54:53)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.get('http://debian.org/')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 69, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 50, in request
response = session.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 465, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 370, in send
timeout=timeout
File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 557, in urlopen
body=body, headers=headers)
File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 388, in _make_request
assert_header_parsing(httplib_response.msg)
File "/usr/lib/python2.7/dist-packages/urllib3/util/response.py", line 49, in assert_header_parsing
if not isinstance(headers, httplib.HTTPMessage):
AttributeError: 'module' object has no attribute 'HTTPMessage'
>>>
$
The start of urllib3/util/response.py looks like:
try:
import http.client as httplib
except ImportError:
import httplib
The try is expected to fail on Python 2.7, but it succeeds because
python-future includes /usr/lib/python2.7/dist-packages/http/client.py which
looks like this:
from __future__ import absolute_import
import sys
assert sys.version_info[0] < 3
from httplib import *
Here is the upstream fix:
https://github.com/shazow/urllib3/commit/f4eb94bc36277d5d584683a03fc9eb3950429a15
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.0.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages python-urllib3 depends on:
ii python-six 1.9.0-3
pn python:any <none>
Versions of packages python-urllib3 recommends:
ii ca-certificates 20150426
ii python-ndg-httpsclient 0.4.0-1
ii python-openssl 0.15.1-2
ii python-pyasn1 0.1.8-1
Versions of packages python-urllib3 suggests:
pn python-ntlm <none>
-- no debconf information
--
Edward.
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#796356; Package python-urllib3.
(Sun, 23 Aug 2015 16:54:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Daniele Tricoli <eriol@mornie.org>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>.
(Sun, 23 Aug 2015 16:54:03 GMT) (full text, mbox, link).
Message #10 received at 796356@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hello Edward,
On Friday 21 August 2015 15:56:09 Edward Betts wrote:
> This version of the package fails to work when python-future is installed.
Many thanks for this report! I'm working on it right now. Thanks also for your
patch (#796717) to detect this kind of problems in advance. My plan is to
enable autopkgtest and I will include your single request test. Many thanks!
Kind regards,
--
Daniele Tricoli 'eriol'
https://mornie.org
[signature.asc (application/pgp-signature, inline)]
Added tag(s) pending.
Request was from eriol-guest@users.alioth.debian.org
to control@bugs.debian.org.
(Sun, 23 Aug 2015 19:27:11 GMT) (full text, mbox, link).
Severity set to 'serious' from 'normal'
Request was from Daniele Tricoli <eriol@mornie.org>
to control@bugs.debian.org.
(Fri, 04 Sep 2015 15:06:18 GMT) (full text, mbox, link).
Merged 796356 797070
Request was from Daniele Tricoli <eriol@mornie.org>
to control@bugs.debian.org.
(Fri, 04 Sep 2015 15:06:21 GMT) (full text, mbox, link).
Reply sent
to Daniele Tricoli <eriol@mornie.org>:
You have taken responsibility.
(Wed, 09 Sep 2015 21:24:07 GMT) (full text, mbox, link).
Notification sent
to Edward Betts <edward@4angle.com>:
Bug acknowledged by developer.
(Wed, 09 Sep 2015 21:24:07 GMT) (full text, mbox, link).
Message #21 received at 796356-close@bugs.debian.org (full text, mbox, reply):
Source: python-urllib3
Source-Version: 1.11-2
We believe that the bug you reported is fixed in the latest version of
python-urllib3, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 796356@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Daniele Tricoli <eriol@mornie.org> (supplier of updated python-urllib3 package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sun, 23 Aug 2015 21:19:59 +0200
Source: python-urllib3
Binary: python-urllib3 python3-urllib3 python-urllib3-whl
Architecture: source all
Version: 1.11-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
Changed-By: Daniele Tricoli <eriol@mornie.org>
Description:
python-urllib3 - HTTP library with thread-safe connection pooling for Python
python-urllib3-whl - HTTP library with thread-safe connection pooling
python3-urllib3 - HTTP library with thread-safe connection pooling for Python3
Closes: 796356
Changes:
python-urllib3 (1.11-2) unstable; urgency=medium
.
* debian/patches/06_rely-on-six-to-import-httplib-or-http.client.patch
- Rely on six to import httplib or http.client. Thanks to Edward Betts
for the report. (Closes: #796356)
Checksums-Sha1:
e992f05fd1fadc53a32cf3e8658110aec4c68b02 2416 python-urllib3_1.11-2.dsc
abe079130a15f179f26dfbe400491d60fcf101e5 8348 python-urllib3_1.11-2.debian.tar.xz
260a5a477bf3801686c5ec6d0ddcfe8cd0a1bdcb 64994 python-urllib3-whl_1.11-2_all.deb
ac47959cb6b6317924698ff303e156d0caad9a3c 64516 python-urllib3_1.11-2_all.deb
c62a9179e50c8daafa1d867be196e79040f3407d 64638 python3-urllib3_1.11-2_all.deb
Checksums-Sha256:
a6bf92ba91aab1c32f0ae8cd285c92085ced4d06692fbc180e74be265eef2b91 2416 python-urllib3_1.11-2.dsc
e71a68e29c1d641d99304b6265d1d0c09e1e80f1019763a2b7fd1c81e2da9d87 8348 python-urllib3_1.11-2.debian.tar.xz
d51f3251a1f2802a3fc9077c60143cfbf543009c006833c2c3efb9b15a137823 64994 python-urllib3-whl_1.11-2_all.deb
b07b4e571c66852cc8d2132057fcd9119d20fb7fb628ccd14320cb2670a2b437 64516 python-urllib3_1.11-2_all.deb
04b46a05570fbee20a6384822135501b988ce283c8d5e9f07b7804c448ffc681 64638 python3-urllib3_1.11-2_all.deb
Files:
77fa045c11a2c824e3bd3e8b2627a20a 2416 python optional python-urllib3_1.11-2.dsc
0d27a34fcbffdbb46a09c3dd8a399583 8348 python optional python-urllib3_1.11-2.debian.tar.xz
0a7baa59ae775e54c0a91279d375e2a0 64994 python optional python-urllib3-whl_1.11-2_all.deb
ceda3ea13e0937b76909f663efae067f 64516 python optional python-urllib3_1.11-2_all.deb
ae3623f2e9f8f0e68b66800b3aeb55d2 64638 python optional python3-urllib3_1.11-2_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCgAGBQJV8JMxAAoJEK728aKnRXZFJWYQAIL65eWDAHAlzwSUxOEMSUdm
uYv+N6/cx0q06E7XlnlFNmgrHcPGEO2gMhktZEZCSC47onXQPDczsDPBeEKxVtct
O6MjWuhQj8N7zemnje3wmt279FxG7vSbPXV0OpbKEH9IHJ0w1BMHuczNENsmBDDJ
2zTpKrsQilXdHuHPoxHMa2ZU7wuVgAsVJjbTcDqqmXuuc8YNhw6Xca9jz9oIwgiO
ARzaH+APUKc+rnZQRp/E7gcIdo1n4Pk/16Em75ut5FNsNftzBwwjC6ltKX3/NRjM
l0AZ9CxvT85jSQkrwAbD/EMFpWhwBuctJyRtQlOFv1X1EzM0doTMgj4sMl2wYHxH
7Z33rW42SaUAIDtJ0P/c2a/rW0rI2cQkWQUmABYS1aP9511DVoDDZ9yJb03b7yzl
r/Tjao1d81gmfUbNiHC2HQhDlO7gMSrHylEgyxpQqx19j4JKs8V1Qam/JSHKZVFH
5+hkGi9unzR27ornWFJlXrglTFl7u5GNoQJWAbFe73ymoUIjJ4qtGtRrImguDPQt
WTT9SMUS4wU7nD26PTwtS0RLceFDINqShd5XHJgObt2in2+IcJo4xb940p3T+2Oc
uvr4cDrXiyhDASkw2fShrdJL6N8D8b6nQc6Milz2hCaU8kLq+xvCJ7vRGdRT5ZFa
1VNIJ4kilvmoYqa9xmwG
=tDgK
-----END PGP SIGNATURE-----
Reply sent
to Daniele Tricoli <eriol@mornie.org>:
You have taken responsibility.
(Wed, 09 Sep 2015 21:24:08 GMT) (full text, mbox, link).
Notification sent
to Jan Hudec <bulb@ucw.cz>:
Bug acknowledged by developer.
(Wed, 09 Sep 2015 21:24:08 GMT) (full text, mbox, link).
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Tue, 13 Oct 2015 07:33:18 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Thu Jan 4 10:01:16 2018;
Machine Name:
beach
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.