diff --git a/paste-string-letters.patch b/paste-string-letters.patch new file mode 100644 index 0000000..ba74fd4 --- /dev/null +++ b/paste-string-letters.patch @@ -0,0 +1,52 @@ +# HG changeset patch +# User Luke Macken +# Date 1403025471 21600 +# Tue Jun 17 11:17:51 2014 -0600 +# Node ID f2df9d42e4954716af7cda3680d00b4ea5fa70a9 +# Parent 646047a947b394c7fc728c57b55888daee344eeb +Use the locale-independent string.ascii_letters instead of string.letters. + +On certain platforms string.letters gets altered by setlocale(), which confuses +some tests. + +https://stackoverflow.com/questions/23743160/locale-getpreferredencoding-why-does-this-reset-string-letters + +diff -r 646047a947b3 -r f2df9d42e495 tests/test_fileapp.py +--- a/tests/test_fileapp.py Wed Mar 19 12:51:48 2014 +0100 ++++ b/tests/test_fileapp.py Tue Jun 17 11:17:51 2014 -0600 +@@ -93,7 +93,7 @@ + def test_file(): + import random, string, os + tempfile = "test_fileapp.%s.txt" % (random.random()) +- content = string.letters * 20 ++ content = string.ascii_letters * 20 + file = open(tempfile,"w") + file.write(content) + file.close() +@@ -178,7 +178,7 @@ + assert res.header('content-length') == '15' + + def test_range(): +- content = string.letters * 5 ++ content = string.ascii_letters * 5 + def build(range, status=200): + app = DataApp(content) + return TestApp(app).get("/",headers={'Range': range}, status=status) +@@ -189,7 +189,7 @@ + from paste import fileapp + import random, string, os + tempfile = "test_fileapp.%s.txt" % (random.random()) +- content = string.letters * (1+(fileapp.CACHE_SIZE / len(string.letters))) ++ content = string.ascii_letters * (1+(fileapp.CACHE_SIZE / len(string.ascii_letters))) + assert len(content) > fileapp.CACHE_SIZE + file = open(tempfile,"w") + file.write(content) +@@ -200,7 +200,7 @@ + return TestApp(app).get("/",headers={'Range': range}, + status=status) + _excercize_range(build,content) +- for size in (13,len(string.letters),len(string.letters)-1): ++ for size in (13,len(string.ascii_letters),len(string.ascii_letters)-1): + fileapp.BLOCK_SIZE = size + _excercize_range(build,content) + finally: diff --git a/python-paste.spec b/python-paste.spec index b30517b..c141dda 100644 --- a/python-paste.spec +++ b/python-paste.spec @@ -7,7 +7,7 @@ Name: python-paste Version: 1.7.5.1 -Release: 10.20111221hg1498%{?dist} +Release: 11.20111221hg1498%{?dist} Summary: Tools for using a Web Server Gateway Interface stack Group: System Environment/Libraries # Most of the code is MIT @@ -35,6 +35,8 @@ Patch2: paste-27-lambda.patch # Fix parsing of digest key value pairs # Submitted upstream pull request Patch3: paste-digest-snap.patch +# Patch submitted upstream https://bitbucket.org/ianb/paste/pull-request/19 +Patch4: paste-string-letters.patch # Submitted upstream pull request with this change. # This patch is needed when creating the tarball, not during rpm build Patch100: paste-manifest.patch @@ -87,6 +89,7 @@ rm paste/util/subprocess24.py %patch1 -p1 -b .tmpta %patch2 -p1 -b .27lambda %patch3 -p1 -b .digest +%patch4 -p1 -b .letters # Strip #! lines that make these seem like scripts %{__sed} -i -e '/^#!.*/,1 d' paste/util/scgiserver.py paste/debug/doctest_webapp.py @@ -150,6 +153,9 @@ rm -rf %{buildroot} %changelog +* Tue Jun 17 2014 Luke Macken - 1.7.5.1-11.20111221hg1498 +- Patch the test suite to get it passing on rawhide (#1106785) + * Sat Jun 07 2014 Fedora Release Engineering - 1.7.5.1-10.20111221hg1498 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild