New Upstream Release - python-webob
Ready changes
Summary
Merged new upstream version: 1.8.7 (was: 1.8.6).
Resulting package
Built on 2022-10-20T12:53 (took 3m30s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-releases python-webob-docapt install -t fresh-releases python3-webob
Lintian Result
Diff
diff --git a/CHANGES.txt b/CHANGES.txt
index 429fdd7..ca33450 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,16 @@
+1.8.7 (2021-02-17)
+------------------
+
+Bugfix
+~~~~~~
+
+- Decoding deflate-encoded responses now supports data which is packed in
+ a zlib container as it is supposed to be. The old, non-standard behaviour
+ is still supported.
+
+ See https://github.com/Pylons/webob/pull/426
+
+
1.8.6 (2020-01-21)
------------------
diff --git a/PKG-INFO b/PKG-INFO
index 3a96fdc..cb33e5d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: WebOb
-Version: 1.8.6
+Version: 1.8.7
Summary: WSGI request and response object
Home-page: http://webob.org/
Author: Ian Bicking
@@ -44,6 +44,19 @@ Description: WebOb
WebOb was authored by Ian Bicking and is currently maintained by the `Pylons
Project <https://pylonsproject.org/>`_ and a team of contributors.
+ 1.8.7 (2021-02-17)
+ ------------------
+
+ Bugfix
+ ~~~~~~
+
+ - Decoding deflate-encoded responses now supports data which is packed in
+ a zlib container as it is supposed to be. The old, non-standard behaviour
+ is still supported.
+
+ See https://github.com/Pylons/webob/pull/426
+
+
1.8.6 (2020-01-21)
------------------
diff --git a/debian/changelog b/debian/changelog
index 97410d0..2ea1620 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-webob (1:1.8.7-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk> Thu, 20 Oct 2022 12:50:54 -0000
+
python-webob (1:1.8.6-3) unstable; urgency=medium
[ Debian Janitor ]
diff --git a/debian/patches/411.diff b/debian/patches/411.diff
index e1cd5b1..503f289 100644
--- a/debian/patches/411.diff
+++ b/debian/patches/411.diff
@@ -1,5 +1,7 @@
---- a/tests/conftest.py
-+++ b/tests/conftest.py
+Index: python-webob.git/tests/conftest.py
+===================================================================
+--- python-webob.git.orig/tests/conftest.py
++++ python-webob.git/tests/conftest.py
@@ -60,7 +60,7 @@ def serve():
log.debug("shutting server down")
server.shutdown()
diff --git a/debian/patches/intersphinx-local.patch b/debian/patches/intersphinx-local.patch
index f126c1c..29ffdb9 100644
--- a/debian/patches/intersphinx-local.patch
+++ b/debian/patches/intersphinx-local.patch
@@ -7,10 +7,10 @@ Patch-Name: intersphinx-local.patch
docs/conf.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
-diff --git a/docs/conf.py b/docs/conf.py
-index 914d0f9..be3e626 100644
---- a/docs/conf.py
-+++ b/docs/conf.py
+Index: python-webob.git/docs/conf.py
+===================================================================
+--- python-webob.git.orig/docs/conf.py
++++ python-webob.git/docs/conf.py
@@ -154,5 +154,6 @@ epub_exclude_files = ['search.html']
# Example configuration for intersphinx: refer to the Python standard library.
diff --git a/setup.py b/setup.py
index cdd7496..68d7bae 100644
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@ docs_extras = [
setup(
name='WebOb',
- version='1.8.6',
+ version='1.8.7',
description="WSGI request and response object",
long_description=README + '\n\n' + CHANGES,
classifiers=[
diff --git a/src/WebOb.egg-info/PKG-INFO b/src/WebOb.egg-info/PKG-INFO
index 3a96fdc..cb33e5d 100644
--- a/src/WebOb.egg-info/PKG-INFO
+++ b/src/WebOb.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: WebOb
-Version: 1.8.6
+Version: 1.8.7
Summary: WSGI request and response object
Home-page: http://webob.org/
Author: Ian Bicking
@@ -44,6 +44,19 @@ Description: WebOb
WebOb was authored by Ian Bicking and is currently maintained by the `Pylons
Project <https://pylonsproject.org/>`_ and a team of contributors.
+ 1.8.7 (2021-02-17)
+ ------------------
+
+ Bugfix
+ ~~~~~~
+
+ - Decoding deflate-encoded responses now supports data which is packed in
+ a zlib container as it is supposed to be. The old, non-standard behaviour
+ is still supported.
+
+ See https://github.com/Pylons/webob/pull/426
+
+
1.8.6 (2020-01-21)
------------------
diff --git a/src/webob/response.py b/src/webob/response.py
index 108a02f..2aad591 100644
--- a/src/webob/response.py
+++ b/src/webob/response.py
@@ -1249,8 +1249,15 @@ class Response(object):
self.content_encoding = None
gzip_f.close()
else:
- # Weird feature: http://bugs.python.org/issue5784
- self.body = zlib.decompress(self.body, -15)
+ try:
+ # RFC7230 section 4.2.2 specifies that the body should be wrapped
+ # inside a ZLIB (RFC1950) container ...
+ self.body = zlib.decompress(self.body)
+ except zlib.error:
+ # ... but there are nonconformant implementations around which send
+ # the data without the ZLIB container, so we use maximum window size
+ # decompression without header check (the - sign)
+ self.body = zlib.decompress(self.body, -15)
self.content_encoding = None
def md5_etag(self, body=None, set_content_md5=False):
diff --git a/tests/test_response.py b/tests/test_response.py
index 07c7f50..9d9f9d3 100644
--- a/tests/test_response.py
+++ b/tests/test_response.py
@@ -381,6 +381,18 @@ def test_decode_content_with_deflate():
assert res.body == body
assert res.content_encoding is None
+def test_decode_content_with_deflate_and_zlib_header():
+ res = Response()
+ body = b"Hey Hey Hey"
+ # don't chop off the zlib container
+ # https://tools.ietf.org/html/rfc7230#section-4.2.2 says
+ # that chopping it exists but is non-conformant
+ res.body = zlib.compress(body)
+ res.content_encoding = "deflate"
+ res.decode_content()
+ assert res.body == body
+ assert res.content_encoding is None
+
def test_content_length():
r0 = Response('x' * 10, content_length=10)
Debdiff
[The following lists of changes regard files as different if they have different names, permissions or owners.]
Files in second set of .debs but not in first
-rw-r--r-- root/root /usr/lib/python3/dist-packages/WebOb-1.8.7.egg-info/PKG-INFO -rw-r--r-- root/root /usr/lib/python3/dist-packages/WebOb-1.8.7.egg-info/dependency_links.txt -rw-r--r-- root/root /usr/lib/python3/dist-packages/WebOb-1.8.7.egg-info/requires.txt -rw-r--r-- root/root /usr/lib/python3/dist-packages/WebOb-1.8.7.egg-info/top_level.txt -rw-r--r-- root/root /usr/lib/python3/dist-packages/WebOb-1.8.7.egg-info/zip-safe
Files in first set of .debs but not in second
-rw-r--r-- root/root /usr/lib/python3/dist-packages/WebOb-1.8.6.egg-info/PKG-INFO -rw-r--r-- root/root /usr/lib/python3/dist-packages/WebOb-1.8.6.egg-info/dependency_links.txt -rw-r--r-- root/root /usr/lib/python3/dist-packages/WebOb-1.8.6.egg-info/requires.txt -rw-r--r-- root/root /usr/lib/python3/dist-packages/WebOb-1.8.6.egg-info/top_level.txt -rw-r--r-- root/root /usr/lib/python3/dist-packages/WebOb-1.8.6.egg-info/zip-safe
No differences were encountered between the control files of package python-webob-doc
No differences were encountered between the control files of package python3-webob