Control: tags 851013 + patch
Control: tags 851013 + pending

Dear maintainer,

I've prepared an NMU for python-pyramid (versioned as 1.6+dfsg-1.1) and 
uploaded it to DELAYED/5. Please feel free to tell me if I should cancel it.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

diff -Nru python-pyramid-1.6+dfsg/debian/changelog python-pyramid-1.6+dfsg/debian/changelog
--- python-pyramid-1.6+dfsg/debian/changelog	2016-01-05 00:00:47.000000000 +0200
+++ python-pyramid-1.6+dfsg/debian/changelog	2018-01-15 20:35:41.000000000 +0200
@@ -1,3 +1,11 @@
+python-pyramid (1.6+dfsg-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add upstream fix for charset related test failure,
+    thanks to Juhani Numminen. (Closes: #851013)
+
+ -- Adrian Bunk <b...@debian.org>  Mon, 15 Jan 2018 20:35:41 +0200
+
 python-pyramid (1.6+dfsg-1) unstable; urgency=medium
 
   * Team upload.
diff -Nru python-pyramid-1.6+dfsg/debian/patches/0001-All-of-the-tests-assume-that-there-is-a-Content-Type.patch python-pyramid-1.6+dfsg/debian/patches/0001-All-of-the-tests-assume-that-there-is-a-Content-Type.patch
--- python-pyramid-1.6+dfsg/debian/patches/0001-All-of-the-tests-assume-that-there-is-a-Content-Type.patch	1970-01-01 02:00:00.000000000 +0200
+++ python-pyramid-1.6+dfsg/debian/patches/0001-All-of-the-tests-assume-that-there-is-a-Content-Type.patch	2018-01-15 20:28:24.000000000 +0200
@@ -0,0 +1,167 @@
+From a897b56fef11df0c1691cd21e990dcb6027cba1a Mon Sep 17 00:00:00 2001
+From: Bert JW Regeer <ber...@regeer.org>
+Date: Sun, 2 Oct 2016 22:27:37 -0600
+Subject: All of the tests assume that there is a Content-Type set
+
+But the application in this case doesn't actually send a Content-Type,
+and thus there is no charset, and thus the tests should be assuming the
+output is binary not text.
+
+Add a Content-Type to be sent back from the app.
+
+This is required to pass all tests on WebOb >1.7 where
+Request.get_response(app) will no longer add the default_content_type if
+a headerlist is passed in to Response.__init__, this allows
+the Response to match what was provided by the app.
+---
+ pyramid/tests/test_scripts/test_prequest.py | 43 +++++++++++++++++++----------
+ 1 file changed, 29 insertions(+), 14 deletions(-)
+
+diff --git a/pyramid/tests/test_scripts/test_prequest.py b/pyramid/tests/test_scripts/test_prequest.py
+index 95cec0518..45db0dbaf 100644
+--- a/pyramid/tests/test_scripts/test_prequest.py
++++ b/pyramid/tests/test_scripts/test_prequest.py
+@@ -34,7 +34,8 @@ class TestPRequestCommand(unittest.TestCase):
+         self.assertEqual(self._out, ['You must provide at least two arguments'])
+ 
+     def test_command_two_args(self):
+-        command = self._makeOne(['', 'development.ini', '/'])
++        command = self._makeOne(['', 'development.ini', '/'],
++                [('Content-Type', 'text/html; charset=UTF-8')])
+         command.run()
+         self.assertEqual(self._path_info, '/')
+         self.assertEqual(self._spec, 'development.ini')
+@@ -42,7 +43,8 @@ class TestPRequestCommand(unittest.TestCase):
+         self.assertEqual(self._out, ['abc'])
+ 
+     def test_command_path_doesnt_start_with_slash(self):
+-        command = self._makeOne(['', 'development.ini', 'abc'])
++        command = self._makeOne(['', 'development.ini', 'abc'],
++                [('Content-Type', 'text/html; charset=UTF-8')])
+         command.run()
+         self.assertEqual(self._path_info, '/abc')
+         self.assertEqual(self._spec, 'development.ini')
+@@ -60,7 +62,8 @@ class TestPRequestCommand(unittest.TestCase):
+ 
+     def test_command_has_good_header_var(self):
+         command = self._makeOne(
+-            ['', '--header=name:value','development.ini', '/'])
++            ['', '--header=name:value','development.ini', '/'],
++            [('Content-Type', 'text/html; charset=UTF-8')])
+         command.run()
+         self.assertEqual(self._environ['HTTP_NAME'], 'value')
+         self.assertEqual(self._path_info, '/')
+@@ -71,7 +74,8 @@ class TestPRequestCommand(unittest.TestCase):
+     def test_command_w_basic_auth(self):
+         command = self._makeOne(
+             ['', '--login=user:password',
+-                 '--header=name:value','development.ini', '/'])
++                 '--header=name:value','development.ini', '/'],
++            [('Content-Type', 'text/html; charset=UTF-8')])
+         command.run()
+         self.assertEqual(self._environ['HTTP_NAME'], 'value')
+         self.assertEqual(self._environ['HTTP_AUTHORIZATION'],
+@@ -83,7 +87,8 @@ class TestPRequestCommand(unittest.TestCase):
+ 
+     def test_command_has_content_type_header_var(self):
+         command = self._makeOne(
+-            ['', '--header=content-type:app/foo','development.ini', '/'])
++            ['', '--header=content-type:app/foo','development.ini', '/'],
++            [('Content-Type', 'text/html; charset=UTF-8')])
+         command.run()
+         self.assertEqual(self._environ['CONTENT_TYPE'], 'app/foo')
+         self.assertEqual(self._path_info, '/')
+@@ -97,7 +102,9 @@ class TestPRequestCommand(unittest.TestCase):
+              '--header=name:value',
+              '--header=name2:value2',
+              'development.ini',
+-             '/'])
++             '/'],
++            [('Content-Type', 'text/html; charset=UTF-8')]
++            )
+         command.run()
+         self.assertEqual(self._environ['HTTP_NAME'], 'value')
+         self.assertEqual(self._environ['HTTP_NAME2'], 'value2')
+@@ -107,7 +114,8 @@ class TestPRequestCommand(unittest.TestCase):
+         self.assertEqual(self._out, ['abc'])
+ 
+     def test_command_method_get(self):
+-        command = self._makeOne(['', '--method=GET', 'development.ini', '/'])
++        command = self._makeOne(['', '--method=GET', 'development.ini', '/'],
++                [('Content-Type', 'text/html; charset=UTF-8')])
+         command.run()
+         self.assertEqual(self._environ['REQUEST_METHOD'], 'GET')
+         self.assertEqual(self._path_info, '/')
+@@ -117,7 +125,8 @@ class TestPRequestCommand(unittest.TestCase):
+ 
+     def test_command_method_post(self):
+         from pyramid.compat import NativeIO
+-        command = self._makeOne(['', '--method=POST', 'development.ini', '/'])
++        command = self._makeOne(['', '--method=POST', 'development.ini', '/'],
++                [('Content-Type', 'text/html; charset=UTF-8')])
+         stdin = NativeIO()
+         command.stdin = stdin
+         command.run()
+@@ -131,7 +140,8 @@ class TestPRequestCommand(unittest.TestCase):
+ 
+     def test_command_method_put(self):
+         from pyramid.compat import NativeIO
+-        command = self._makeOne(['', '--method=PUT', 'development.ini', '/'])
++        command = self._makeOne(['', '--method=PUT', 'development.ini', '/'],
++                [('Content-Type', 'text/html; charset=UTF-8')])
+         stdin = NativeIO()
+         command.stdin = stdin
+         command.run()
+@@ -145,7 +155,8 @@ class TestPRequestCommand(unittest.TestCase):
+ 
+     def test_command_method_patch(self):
+         from pyramid.compat import NativeIO
+-        command = self._makeOne(['', '--method=PATCH', 'development.ini', '/'])
++        command = self._makeOne(['', '--method=PATCH', 'development.ini', '/'],
++                [('Content-Type', 'text/html; charset=UTF-8')])
+         stdin = NativeIO()
+         command.stdin = stdin
+         command.run()
+@@ -160,7 +171,8 @@ class TestPRequestCommand(unittest.TestCase):
+     def test_command_method_propfind(self):
+         from pyramid.compat import NativeIO
+         command = self._makeOne(['', '--method=PROPFIND', 'development.ini',
+-                                '/'])
++                                '/'],
++                                [('Content-Type', 'text/html; charset=UTF-8')])
+         stdin = NativeIO()
+         command.stdin = stdin
+         command.run()
+@@ -173,7 +185,8 @@ class TestPRequestCommand(unittest.TestCase):
+     def test_command_method_options(self):
+         from pyramid.compat import NativeIO
+         command = self._makeOne(['', '--method=OPTIONS', 'development.ini',
+-                                '/'])
++                                '/'],
++                                [('Content-Type', 'text/html; charset=UTF-8')])
+         stdin = NativeIO()
+         command.stdin = stdin
+         command.run()
+@@ -184,7 +197,8 @@ class TestPRequestCommand(unittest.TestCase):
+         self.assertEqual(self._out, ['abc'])
+ 
+     def test_command_with_query_string(self):
+-        command = self._makeOne(['', 'development.ini', '/abc?a=1&b=2&c'])
++        command = self._makeOne(['', 'development.ini', '/abc?a=1&b=2&c'],
++                [('Content-Type', 'text/html; charset=UTF-8')])
+         command.run()
+         self.assertEqual(self._environ['QUERY_STRING'], 'a=1&b=2&c')
+         self.assertEqual(self._path_info, '/abc')
+@@ -194,7 +208,8 @@ class TestPRequestCommand(unittest.TestCase):
+ 
+     def test_command_display_headers(self):
+         command = self._makeOne(
+-            ['', '--display-headers', 'development.ini', '/'])
++            ['', '--display-headers', 'development.ini', '/'],
++            [('Content-Type', 'text/html; charset=UTF-8')])
+         command.run()
+         self.assertEqual(self._path_info, '/')
+         self.assertEqual(self._spec, 'development.ini')
+-- 
+2.11.0
+
diff -Nru python-pyramid-1.6+dfsg/debian/patches/series python-pyramid-1.6+dfsg/debian/patches/series
--- python-pyramid-1.6+dfsg/debian/patches/series	2016-01-05 00:00:47.000000000 +0200
+++ python-pyramid-1.6+dfsg/debian/patches/series	2018-01-15 20:34:45.000000000 +0200
@@ -1 +1,2 @@
 tweak-requirements.patch
+0001-All-of-the-tests-assume-that-there-is-a-Content-Type.patch

Reply via email to