From 4ad6b291e598db02aed35fbb5e6a560db3d94697 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Jan 10 2013 14:56:57 +0000 Subject: fix build/test issue on python 3 --- diff --git a/python-webob1.2.spec b/python-webob1.2.spec index e5b0004..73c7c6f 100644 --- a/python-webob1.2.spec +++ b/python-webob1.2.spec @@ -10,12 +10,17 @@ Name: python-webob1.2 Summary: WSGI request and response object Version: 1.2.3 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT Group: System Environment/Libraries URL: http://pythonpaste.org/webob/ Source0: http://pypi.python.org/packages/source/W/WebOb/WebOb-%{version}.tar.gz Source1: README.Fedora + +# https://github.com/Pylons/webob/issues/75 +# Fix build/test issue on python 3 +Patch1: webob-1.2.3-test-headers2-fix.patch + BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools @@ -58,6 +63,8 @@ cp -p %{SOURCE1} . # in Fedora. %{__rm} -f tests/performance_test.py +%patch1 -p1 -b .test_headers2 + %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} @@ -104,7 +111,7 @@ popd %endif %changelog -* Thu Jan 10 2013 Pádraig Brady - 1.2.3-1 +* Thu Jan 10 2013 Pádraig Brady - 1.2.3-2 - Update to WebOb-1.2.3 * Thu Nov 29 2012 Ralph Bean - 1.2.1-9 diff --git a/webob-1.2.3-test-headers2-fix.patch b/webob-1.2.3-test-headers2-fix.patch new file mode 100644 index 0000000..2b5cb04 --- /dev/null +++ b/webob-1.2.3-test-headers2-fix.patch @@ -0,0 +1,25 @@ +From 3a2c16f2f72dbca5ddfce7f649daf426c2125fed Mon Sep 17 00:00:00 2001 +From: Aaron DeVore +Date: Tue, 30 Oct 2012 11:55:30 -0700 +Subject: [PATCH] Fix issue #75: depending on dict order in test_headers2 + +--- + tests/test_request.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/tests/test_request.py b/tests/test_request.py +index f219d36..3e38e7a 100644 +--- a/tests/test_request.py ++++ b/tests/test_request.py +@@ -2662,7 +2662,7 @@ class TestRequest_functional(unittest.TestCase): + self.assertTrue(i in r.headers and + 'HTTP_'+i.upper().replace('-', '_') in r.environ) + r.headers = {'Server':'Apache'} +- self.assertEqual(list(r.environ.keys()), ['a', 'HTTP_SERVER']) ++ self.assertEqual(set(r.environ.keys()), set(['a', 'HTTP_SERVER'])) + + def test_host_url(self): + # Request has a read only property host_url that combines several +-- +1.7.6.4 +