Your message dated Fri, 04 Aug 2017 06:34:29 +0000 with message-id <[email protected]> and subject line Bug#859504: fixed in requests 2.18.1-1 has caused the Debian Bug report #859504, regarding python-requests breaks packages using urllib3 to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 859504: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859504 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: python-requests Version: 2.12.4-1 Severity: important Tags: patch Hello, thank you for maintaining python-requests. It seems that patch use-pip-unbundling.patch doen not work as expected: >>> import sys, urllib3 >>> from urllib3.exceptions import HTTPError >>> urllib3.exceptions.HTTPError is HTTPError True >>> sys.modules["urllib3.exceptions"] is urllib3.exceptions True >>> import requests >>> urllib3.exceptions.HTTPError is HTTPError False >>> sys.modules["urllib3.exceptions"] is urllib3.exceptions False This causes (otherwise correct) Python programs to fail by simply importing the 'requests' module. The solution proposed by upstream[1] doesn't work either. [1] https://github.com/kennethreitz/requests/blob/master/requests/packages/__init__.py Attached is a patch that works for me and seems to fix the above bug. It would be great if this could be fixed for stretch. Best, -- Iliasdiff -pru old/debian/patches/use-pip-unbundling.patch new/debian/patches/use-pip-unbundling.patch --- old/debian/patches/use-pip-unbundling.patch 2017-04-04 13:31:19.965450626 +0300 +++ new/debian/patches/use-pip-unbundling.patch 2017-04-04 13:35:17.882779284 +0300 @@ -10,11 +10,11 @@ Patch-Name: use-pip-unbundling.patch requests/packages/__init__.py | 66 +++++++++++++++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 15 deletions(-) -diff --git a/requests/packages/__init__.py b/requests/packages/__init__.py -index 4077265..b1206b2 100644 +Index: b/requests/packages/__init__.py +=================================================================== --- a/requests/packages/__init__.py +++ b/requests/packages/__init__.py -@@ -23,20 +23,56 @@ request. +@@ -23,20 +23,54 @@ request. from __future__ import absolute_import import sys @@ -34,24 +34,21 @@ index 4077265..b1206b2 100644 - import chardet - sys.modules['%s.chardet' % __name__] = chardet + try: -+ __import__(vendored_name, globals(), locals(), level=0) ++ __import__(modulename, globals(), locals(), level=0) + except ImportError: -+ try: -+ __import__(modulename, globals(), locals(), level=0) -+ except ImportError: -+ # We can just silently allow import failures to pass here. If we -+ # got to this point it means that ``import requests.packages.whatever`` -+ # failed and so did ``import whatever``. Since we're importing this -+ # upfront in an attempt to alias imports, not erroring here will -+ # just mean we get a regular import error whenever requests -+ # *actually* tries to import one of these modules to use it, which -+ # actually gives us a better error message than we would have -+ # otherwise gotten. -+ pass -+ else: -+ sys.modules[vendored_name] = sys.modules[modulename] -+ base, head = vendored_name.rsplit(".", 1) -+ setattr(sys.modules[base], head, sys.modules[modulename]) ++ # We can just silently allow import failures to pass here. If we ++ # got to this point it means that ``import requests.packages.whatever`` ++ # failed and so did ``import whatever``. Since we're importing this ++ # upfront in an attempt to alias imports, not erroring here will ++ # just mean we get a regular import error whenever requests ++ # *actually* tries to import one of these modules to use it, which ++ # actually gives us a better error message than we would have ++ # otherwise gotten. ++ pass ++ else: ++ sys.modules[vendored_name] = sys.modules[modulename] ++ base, head = vendored_name.rsplit(".", 1) ++ setattr(sys.modules[base], head, sys.modules[modulename]) -try: - from . import idna @@ -67,6 +64,7 @@ index 4077265..b1206b2 100644 +vendored('urllib3.contrib') +vendored('urllib3.contrib.ntlmpool') +vendored('urllib3.contrib.pyopenssl') ++vendored('urllib3.contrib.socks') +vendored('urllib3.exceptions') +vendored('urllib3.fields') +vendored('urllib3.filepost')
--- End Message ---
--- Begin Message ---Source: requests Source-Version: 2.18.1-1 We believe that the bug you reported is fixed in the latest version of requests, 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 [email protected], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Daniele Tricoli <[email protected]> (supplier of updated requests 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 [email protected]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 1.8 Date: Fri, 04 Aug 2017 08:13:04 +0200 Source: requests Binary: python-requests python3-requests Architecture: source all Version: 2.18.1-1 Distribution: unstable Urgency: medium Maintainer: Debian Python Modules Team <[email protected]> Changed-By: Daniele Tricoli <[email protected]> Description: python-requests - elegant and simple HTTP library for Python2, built for human bein python3-requests - elegant and simple HTTP library for Python3, built for human bein Closes: 856619 859504 Changes: requests (2.18.1-1) unstable; urgency=medium . * New upstream release. (Closes: #856619) - No more bundling of dependencies. (Closes: #859504) * Drop all patches. * Add autodep8 tests. * debian/control - Bump python{,3}-urllib3 dependencies to (>= 1.21.1) (<< 1.22). - Bump Standards-Version to 4.0.0 (no changes needed). - Add version constraint for chardet and idna. - Add python{,3}-certifi to Build-Depends and Depends. * debian/copyright - Remove stanzas of no more bundled dependencies. - Update copyright years. Checksums-Sha1: 411ee5a530c90b59dc31d0380d7feea23bed4af7 2375 requests_2.18.1-1.dsc 8927e5bf2feb7fa43844e4972e48f9a384f7029d 124229 requests_2.18.1.orig.tar.gz bcdb4de835fd49557e2f2da046fa1fb2ea2bf490 6192 requests_2.18.1-1.debian.tar.xz 954ca4c6035223d91eb5c2e993d150e3ecb94dfe 76482 python-requests_2.18.1-1_all.deb 0f09765879f6ab809b7a77b0e6c19dcd1b812735 76228 python3-requests_2.18.1-1_all.deb 5ae4462ffbba383fb2fbb524274c1a32d913fb79 7002 requests_2.18.1-1_amd64.buildinfo Checksums-Sha256: 3b44737d1e9bb42ec951b50835c80edf9716d408c2950e84494860a6971a81d2 2375 requests_2.18.1-1.dsc c6f3bdf4a4323ac7b45d01e04a6f6c20e32a052cd04de81e05103abc049ad9b9 124229 requests_2.18.1.orig.tar.gz 9bf70177f301cd700ae5eb546410b62198b85d7ddad2dd99012170a046103416 6192 requests_2.18.1-1.debian.tar.xz c45f7047a7a1c7e361a62bb9e28bed90ab74e3c2b48a9d2b46961d17de359b51 76482 python-requests_2.18.1-1_all.deb 2f5d9b2950256a43c73d08fb3ae8498a060f523ea88cd3d6e03a4b53ba43dde5 76228 python3-requests_2.18.1-1_all.deb 66d684d0265db63c4eaf42b8a4809f41119ad542d9df79062cd68faba3723cc7 7002 requests_2.18.1-1_amd64.buildinfo Files: fbb687db85e5e82acad34d6ac26f9cd5 2375 python optional requests_2.18.1-1.dsc 40f723ed01dddeaf990d0609d073f021 124229 python optional requests_2.18.1.orig.tar.gz a4fdc16f174b17e25cffb20a6516ef75 6192 python optional requests_2.18.1-1.debian.tar.xz 2f1a71f48e86a44f8bef2453da830d27 76482 python optional python-requests_2.18.1-1_all.deb 31b7d67a49233eef5c93a5ba76c405f8 76228 python optional python3-requests_2.18.1-1_all.deb 92c432bb5b60e6273d9c40ea345151f6 7002 python optional requests_2.18.1-1_amd64.buildinfo -----BEGIN PGP SIGNATURE----- iQJFBAEBCgAvFiEExlrvn+W/jMvW7bAZi69SLA1szt0FAlmEEWcRHGVyaW9sQG1v cm5pZS5vcmcACgkQi69SLA1szt2DlhAAi0eZ9jryxNGU+28Ya1y/uw8URWE30pRH Od+n3hQOH6N2lDCg/jBupaiX5cfGspj9ShfXlauvP4VpoB19BHx+2cCGmiFhsyAe N56LRaNVy4qQT4qYhMHwmMTLLHoVh92FGDoIPQrQnEKKCN/Q2gniIe8LRhkts0u+ xMqfuKmYS9wCdqqYvM36RNtmMXUNC/8fGdTGzWLDjFCp7c+RzfcVaAbn3qZB/j+U G9KRMIlCqkJ6OOeNoFvECrLVVTyoIpjhxiIBmZeu9L+RmPWQSIOHjkn36tnB2Asb 3t7HeqnHCRTsYwh5ga57ZHzadv+EKqY9sszfrcCxtA0Hx1jklDgW8m8K7p4LiPZf ooVboIcYrRSDYEbiMBoaqubTscOp8b1RaukKLN6YzSRifLOeG6UVODpjDmBqz23G T3ZfuAXVW1enfZxQYgIqxDs8Io55W0vb/PYLrDOCVYEPBAjWi+m3zobsvpwbxgW0 g+eXW7qCEeHEqeJuECUuLuiLnX3+6d6v8r2bryh7pcFjGCE4M+kbi7ST2njE10Yq FO4syqhklBXGa+/8Eid+X2zsMaFe4yU4YuEbylMY9dwJrGGW/5wBkUyFod7WBt4j 627zMSgfTWHP4Hx+7yGxsDWF/Lt4vm/K6gi92TaUg/Nq1cQgYlUie1B9Br2Od16U k9/bciW+xgk= =IXMF -----END PGP SIGNATURE-----
--- End Message ---
_______________________________________________ Python-modules-team mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

