Your message dated Thu, 11 Jun 2015 07:34:22 +0000
with message-id <[email protected]>
and subject line Bug#788383: fixed in requests 2.7.0-3
has caused the Debian Bug report #788383,
regarding python-requests: Better devendorization
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.)


-- 
788383: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788383
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python-requests
Version: 2.7.0-2
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Dear Maintainer,

In https://github.com/kennethreitz/requests/pull/2567 upstream is
considering a patch to make it easier for Debian and other downstream
consumers to devendorized the bundled urllib3 and chardet libraries.
I've done some extensive testing of this as you can see in my comment
on the above PR.  Attached is a patch against the Debian svn package
branch for python-requests which drops two previous quilt patches and
adds a new one which includes the proposed upstream PR.  From my
testing it seems to do everything we need it to do with a minimum of
delta from upstream.  Even less if/when upstream merges the PR!

- -- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.0.0-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python-requests depends on:
ii  ca-certificates  20150426
ii  python-chardet   2.3.0-1
ii  python-urllib3   1.10.4-1
pn  python:any       <none>

python-requests recommends no packages.

Versions of packages python-requests suggests:
ii  python-ndg-httpsclient  0.3.2-1
ii  python-openssl          0.14-1
ii  python-pyasn1           0.1.7-1

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJVeJvCAAoJEBJutWOnSwa/RdcQAJotaexzbqse4Tr5W++yZNCb
Pj4KJ1KYIiXvR15741uwiQ38LTndpAaWU88mklHOz3Pp77ztMlztyseSz0qZlQ/A
RFZ5DS3dlybWwqg/1rxCNv3nd8iv0Ex2M3TahqkcOxYmXmwArBFdH5TGXs1tmV3h
NbizvXLHX2x1ZfsWemtgCyGR37EfdfUeZqFi2R6UXl8sH+8xbudaNb77fT4Hm+98
rhiA/5QU39/m1w7/yE38XDu35n3+idUksK3B769xKnshBNG1/7UvO0skcPfWm7kf
PVPqow5ZZqKCr4nZWJZDPRlp4nYhYt0loFfRbbntef0nX+fYXRLT9Go6UsBlFixf
wiXdVY/NaoCCdS26Mi/2ByODddSTkdVarjt3Yp/0TSzRnwyVDHVpT1mjQQDS8iMY
KaKbcjbmiGPYraI3Oe6uzWgmi9A3UjUF3onpf6uJYcTw/TPN580Ko5oia5ByCc4D
thgorRks2TRHAvPuvqKUvWM8uxcOUOqW819sdVxy5jDhuLrYCUXqQVDzSKbkyNQn
gsQqfNUGEd9Ct1XIyei4K0lmyXjf1Oy3Z2xTnokzn7xgWqwM1MhkgHElseB7sJD8
r0itJIPfo7KbD/pQGlZwM7KwVy5Fw2YjGKdXnfIie38XcGOu9Jhm1XFAtXbXovm3
MEUExmUbDxN+6kvtcXt0
=LE0a
-----END PGP SIGNATURE-----
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 32945)
+++ debian/changelog	(working copy)
@@ -1,3 +1,14 @@
+requests (2.7.0-3) UNRELEASED; urgency=medium
+
+  * debian/patches:
+    - 02_use-system-chardet-and-urllib3.patch and
+      04_make-requests.packages.urllib3-same-as-urllib3.patch: Removed in
+      favor of upstream's pull request #2567
+    - 05_upstream_devendorize.patch: Upstream's pull request to better
+      support the devendorizing of urllib3 and chardet.
+
+ -- Barry Warsaw <[email protected]>  Wed, 10 Jun 2015 12:28:58 -0400
+
 requests (2.7.0-2) unstable; urgency=medium
 
   * Upload to unstable.
Index: debian/patches/02_use-system-chardet-and-urllib3.patch
===================================================================
--- debian/patches/02_use-system-chardet-and-urllib3.patch	(revision 32945)
+++ debian/patches/02_use-system-chardet-and-urllib3.patch	(working copy)
@@ -1,129 +0,0 @@
-Description: Use the system python-chardet and python-urllib3 instead of the
- embedded copies but provide requests.packages package because it will be
- used to supply a stub for ``requests.packages.urllib3``.
-Author: Daniele Tricoli <[email protected]>
-Forwarded: not-needed
-Last-Update: 2015-05-04
-
---- a/requests/adapters.py
-+++ b/requests/adapters.py
-@@ -11,22 +11,22 @@
- import socket
- 
- from .models import Response
--from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
--from .packages.urllib3.response import HTTPResponse
--from .packages.urllib3.util import Timeout as TimeoutSauce
--from .packages.urllib3.util.retry import Retry
-+from urllib3.poolmanager import PoolManager, proxy_from_url
-+from urllib3.response import HTTPResponse
-+from urllib3.util import Timeout as TimeoutSauce
-+from urllib3.util.retry import Retry
- from .compat import urlparse, basestring
- from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers,
-                     prepend_scheme_if_needed, get_auth_from_url, urldefragauth)
- from .structures import CaseInsensitiveDict
--from .packages.urllib3.exceptions import ConnectTimeoutError
--from .packages.urllib3.exceptions import HTTPError as _HTTPError
--from .packages.urllib3.exceptions import MaxRetryError
--from .packages.urllib3.exceptions import ProxyError as _ProxyError
--from .packages.urllib3.exceptions import ProtocolError
--from .packages.urllib3.exceptions import ReadTimeoutError
--from .packages.urllib3.exceptions import SSLError as _SSLError
--from .packages.urllib3.exceptions import ResponseError
-+from urllib3.exceptions import ConnectTimeoutError
-+from urllib3.exceptions import HTTPError as _HTTPError
-+from urllib3.exceptions import MaxRetryError
-+from urllib3.exceptions import ProxyError as _ProxyError
-+from urllib3.exceptions import ProtocolError
-+from urllib3.exceptions import ReadTimeoutError
-+from urllib3.exceptions import SSLError as _SSLError
-+from urllib3.exceptions import ResponseError
- from .cookies import extract_cookies_to_jar
- from .exceptions import (ConnectionError, ConnectTimeout, ReadTimeout, SSLError,
-                          ProxyError, RetryError)
---- a/requests/compat.py
-+++ b/requests/compat.py
-@@ -4,7 +4,7 @@
- pythoncompat
- """
- 
--from .packages import chardet
-+import chardet
- 
- import sys
- 
-@@ -39,7 +39,7 @@
-     import cookielib
-     from Cookie import Morsel
-     from StringIO import StringIO
--    from .packages.urllib3.packages.ordered_dict import OrderedDict
-+    from urllib3.packages.ordered_dict import OrderedDict
- 
-     builtin_str = str
-     bytes = str
---- a/requests/models.py
-+++ b/requests/models.py
-@@ -16,10 +16,10 @@
- 
- from .auth import HTTPBasicAuth
- from .cookies import cookiejar_from_dict, get_cookie_header, _copy_cookie_jar
--from .packages.urllib3.fields import RequestField
--from .packages.urllib3.filepost import encode_multipart_formdata
--from .packages.urllib3.util import parse_url
--from .packages.urllib3.exceptions import (
-+from urllib3.fields import RequestField
-+from urllib3.filepost import encode_multipart_formdata
-+from urllib3.util import parse_url
-+from urllib3.exceptions import (
-     DecodeError, ReadTimeoutError, ProtocolError, LocationParseError)
- from .exceptions import (
-     HTTPError, MissingSchema, InvalidURL, ChunkedEncodingError,
---- a/setup.py
-+++ b/setup.py
-@@ -18,12 +18,6 @@
- packages = [
-     'requests',
-     'requests.packages',
--    'requests.packages.chardet',
--    'requests.packages.urllib3',
--    'requests.packages.urllib3.packages',
--    'requests.packages.urllib3.contrib',
--    'requests.packages.urllib3.util',
--    'requests.packages.urllib3.packages.ssl_match_hostname',
- ]
- 
- requires = []
---- a/requests/__init__.py
-+++ b/requests/__init__.py
-@@ -50,7 +50,7 @@
- 
- # Attempt to enable urllib3's SNI support, if possible
- try:
--    from .packages.urllib3.contrib import pyopenssl
-+    from urllib3.contrib import pyopenssl
-     pyopenssl.inject_into_urllib3()
- except ImportError:
-     pass
---- a/requests/exceptions.py
-+++ b/requests/exceptions.py
-@@ -7,7 +7,7 @@
- This module contains the set of Requests' exceptions.
- 
- """
--from .packages.urllib3.exceptions import HTTPError as BaseHTTPError
-+from urllib3.exceptions import HTTPError as BaseHTTPError
- 
- 
- class RequestException(IOError):
---- a/requests/sessions.py
-+++ b/requests/sessions.py
-@@ -21,7 +21,7 @@
- from .utils import to_key_val_list, default_headers, to_native_string
- from .exceptions import (
-     TooManyRedirects, InvalidSchema, ChunkedEncodingError, ContentDecodingError)
--from .packages.urllib3._collections import RecentlyUsedContainer
-+from urllib3._collections import RecentlyUsedContainer
- from .structures import CaseInsensitiveDict
- 
- from .adapters import HTTPAdapter
Index: debian/patches/03_export-IncompleteRead.patch
===================================================================
--- debian/patches/03_export-IncompleteRead.patch	(revision 32945)
+++ debian/patches/03_export-IncompleteRead.patch	(working copy)
@@ -7,15 +7,15 @@
 
 --- a/requests/compat.py
 +++ b/requests/compat.py
-@@ -92,6 +92,7 @@
+@@ -40,6 +40,7 @@
      from Cookie import Morsel
      from StringIO import StringIO
-     from urllib3.packages.ordered_dict import OrderedDict
+     from .packages.urllib3.packages.ordered_dict import OrderedDict
 +    from httplib import IncompleteRead
  
      builtin_str = str
      bytes = str
-@@ -107,6 +108,7 @@
+@@ -54,6 +55,7 @@
      from http.cookies import Morsel
      from io import StringIO
      from collections import OrderedDict
Index: debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch
===================================================================
--- debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch	(revision 32945)
+++ debian/patches/04_make-requests.packages.urllib3-same-as-urllib3.patch	(working copy)
@@ -1,46 +0,0 @@
-Description: Make Python import system know that requests.packages.urllib3 and
-urllib3 are the same thing.
-Author: Jakub Wilk <[email protected]>
-Forwarded: not-needed
-Bug-Debian: https://bugs.debian.org/769047
-Bug-Debian: https://bugs.debian.org/769496
-Last-Update: 2015-05-03
-
---- a/requests/__init__.py
-+++ b/requests/__init__.py
-@@ -48,6 +48,28 @@
- __license__ = 'Apache 2.0'
- __copyright__ = 'Copyright 2015 Kenneth Reitz'
- 
-+# On Debian make Python import system know that requests.packages.urllib3
-+# and urllib3 are the same thing.
-+import pkgutil
-+import sys
-+import urllib3
-+
-+def _attach_namespace(package, where):
-+    # Attach package top namespace
-+    sys.modules[where + '.' + package.__name__] = package
-+    for loader, name, ispkg in pkgutil.walk_packages(package.__path__,
-+                                                     package.__name__ + '.'):
-+        try:
-+            module = __import__(name)
-+        except ImportError:
-+            continue
-+        sys.modules[where + '.' + name] = module
-+
-+_attach_namespace(urllib3, 'requests.packages')
-+del _attach_namespace
-+# Python 3 needs this imported explicitly.
-+import requests.packages
-+
- # Attempt to enable urllib3's SNI support, if possible
- try:
-     from urllib3.contrib import pyopenssl
---- a/requests/packages/__init__.py
-+++ b/requests/packages/__init__.py
-@@ -1,3 +1,3 @@
- from __future__ import absolute_import
- 
--from . import urllib3
-+import urllib3
Index: debian/patches/05_upstream_devendorize.patch
===================================================================
--- debian/patches/05_upstream_devendorize.patch	(revision 0)
+++ debian/patches/05_upstream_devendorize.patch	(working copy)
@@ -0,0 +1,50 @@
+From b7fc3a1250cb13ed3b55010ccc33f2681f0ffa4a Mon Sep 17 00:00:00 2001
+From: Markus Unterwaditzer <[email protected]>
+Date: Fri, 24 Apr 2015 12:05:18 +0200
+Subject: [PATCH 1/2] Import aliases for Debian
+
+Alternative to #2375
+---
+ requests/packages/__init__.py | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+--- a/requests/packages/__init__.py
++++ b/requests/packages/__init__.py
+@@ -1,3 +1,36 @@
++'''
++Debian and other distributions "unbundle" requests' vendored dependencies, and
++rewrite all imports to use the global versions of ``urllib3`` and ``chardet``.
++The problem with this is that not only requests itself imports those
++dependencies, but third-party code outside of the distros' control too.
++
++In reaction to these problems, the distro maintainers replaced
++``requests.packages`` with a magical "stub module" that imports the correct
++modules. The implementations were varying in quality and all had severe
++problems. For example, a symlink (or hardlink) that links the correct modules
++into place introduces problems regarding object identity, since you now have
++two modules in `sys.modules` with the same API, but different identities::
++
++    requests.packages.urllib3 is not urllib3
++
++With version ``2.5.2``, requests started to maintain its own stub, so that
++distro-specific breakage would be reduced to a minimum, even though the whole
++issue is not requests' fault in the first place. See
++https://github.com/kennethreitz/requests/pull/2375 for the corresponding pull
++request.
++'''
++
+ from __future__ import absolute_import
++import sys
++
++try:
++    from . import urllib3
++except ImportError:
++    import urllib3
++    sys.modules['%s.urllib3' % __name__] = urllib3
+ 
+-from . import urllib3
++try:
++    from . import chardet
++except ImportError:
++    import chardet
++    sys.modules['%s.chardet' % __name__] = chardet
Index: debian/patches/series
===================================================================
--- debian/patches/series	(revision 32945)
+++ debian/patches/series	(working copy)
@@ -1,4 +1,3 @@
 01_use-system-ca-certificates.patch
-02_use-system-chardet-and-urllib3.patch
 03_export-IncompleteRead.patch
-04_make-requests.packages.urllib3-same-as-urllib3.patch
+05_upstream_devendorize.patch
Index: debian/rules
===================================================================
--- debian/rules	(revision 32945)
+++ debian/rules	(working copy)
@@ -25,6 +25,10 @@
 
 override_dh_auto_install:
 	dh_auto_install
+	rm -rf debian/python-requests/usr/lib/python*/dist-packages/requests/packages/urllib3
+	rm -rf debian/python-requests/usr/lib/python*/dist-packages/requests/packages/chardet
+	rm -rf debian/python3-requests/usr/lib/python*/dist-packages/requests/packages/urllib3
+	rm -rf debian/python3-requests/usr/lib/python*/dist-packages/requests/packages/chardet
 	python3 setup.py bdist_wheel \
 		--universal \
 		-d $(CURDIR)/debian/tmp/usr/share/python-wheels

--- End Message ---
--- Begin Message ---
Source: requests
Source-Version: 2.7.0-3

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: Thu, 11 Jun 2015 01:39:13 +0200
Source: requests
Binary: python-requests python3-requests python-requests-whl
Architecture: source all
Version: 2.7.0-3
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
 python-requests-whl - elegant and simple HTTP library for Python, built for 
human being
 python3-requests - elegant and simple HTTP library for Python3, built for 
human bein
Closes: 771349 788383
Changes:
 requests (2.7.0-3) unstable; urgency=medium
 .
   [ Barry Warsaw ]
   * debian/patches:
     - 02_use-system-chardet-and-urllib3.patch and
       04_make-requests.packages.urllib3-same-as-urllib3.patch: Removed in
       favor of upstream's pull request #2567
     - 05_upstream_devendorize.patch: Upstream's pull request to better
       support the devendorizing of urllib3 and chardet.
       (Closes: #771349, #788383)
 .
   [ Daniele Tricoli ]
   * debian/python{,3}-requests.pyremove
     - Remove embedded copy of chardet and urllib3. Previously it was done by
       02_use-system-chardet-and-urllib3.patch.
Checksums-Sha1:
 856adbc630284d9f7cc2b75a9f151063b26b28fb 2277 requests_2.7.0-3.dsc
 3ad25e64a343f524eaebebae905c311f2d6c4e9d 13120 requests_2.7.0-3.debian.tar.xz
 e64453a71e80da235ce129db039c13df289e5b9a 312466 
python-requests-whl_2.7.0-3_all.deb
 0043dc5ae8c498cd560430ff6270dda517796fa0 66258 python-requests_2.7.0-3_all.deb
 3d8ada5a3e34edd3f42355f15e472226f20b51e6 66106 python3-requests_2.7.0-3_all.deb
Checksums-Sha256:
 325eccca72c9a1118666dd36891e2ba543f23843fc460009f9e3a36b6bfd3cdb 2277 
requests_2.7.0-3.dsc
 8d2eb5cb2f56e7a5f588fae27c81f9bcad803d46c61bd6d8fefca9f915874879 13120 
requests_2.7.0-3.debian.tar.xz
 fc11e620ce8029efa7f69e671ed767e71a085d9f478a62ca55be53ffc4a1fed7 312466 
python-requests-whl_2.7.0-3_all.deb
 f34f8109f46bd4e5803e66c7d4260465108f12c902dc731edd7bba8495938240 66258 
python-requests_2.7.0-3_all.deb
 101b7d69074bc8f0aa646d72f812943cec21a905561ede0406740412dc0e7c43 66106 
python3-requests_2.7.0-3_all.deb
Files:
 a35a39814395ac0b8c647c6cd02f0827 2277 python optional requests_2.7.0-3.dsc
 9cf3010d0d2c4303d7fee6a1656eec7c 13120 python optional 
requests_2.7.0-3.debian.tar.xz
 4916f6f67dc94a8d377f6a8115371857 312466 python optional 
python-requests-whl_2.7.0-3_all.deb
 f4f8277d6092577540d586e68b289870 66258 python optional 
python-requests_2.7.0-3_all.deb
 20533122520d8cf34fa27eac8f00d797 66106 python optional 
python3-requests_2.7.0-3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJVeTf7AAoJEK728aKnRXZFH2kP/3/AzfnSyhzf2LgsclDVHR5j
OodsBhxMhEHPGXCGoAj9wyQQ6DRyzyGceEitSZHnBeMPPUPYZ2OwBL7ykaS5y2JO
lQncBIiFgjuI0RujtT72RHkOkE3QO8+JupHSWFL29eFkiPOGZ9b8ASqKmnuaCmvY
dI9YaYqCD0UG1P2lGmWQPkByRoUGqTvBH1JnxRoWyotVdrj8FUPS/AtEo1m35qxd
a1YioASG7xtc7N2ZqcogZRafwaBXfxH3MiVF3V4tKXe4ByxR6ozwf59JZTfOt9FW
+v+VcK4Y9LY916SqGcyDmfMhCXS/qqV3acv5aR1ENLV2h1zmDxond9r7fnHAqeXZ
ISI2HO9Yl6+/KSdK4i2bc7LpVDgA1m81IfTm3kruPuOTlc6Ppb9YqTsBjKPccY8V
PvK0Je86C6ymZp+j6zesn+qytPdl29MUya1p6X2h003NJMr4RoweCJtdhuKbWDS/
iM1jj1KtpqvjCcSZRaJSf3fHaJhd3XLgnCxK6jOk0xOI86KWa9oJlnPH5J9aRQWq
QLtiCBgSpsijhZDy3lP11HHOsyyPbB9SBSUJFNEMURLhcpf697uGL7Zj9opxVaNh
KVljnBflIgaX0FS9MDbGwstM4RcGjcDWmMl/6VbLCR6mvW7DzF1vnW5FUoXbRToX
r7f/TLg4c8oOcDwRzz0C
=VUVC
-----END PGP SIGNATURE-----

--- End Message ---
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to