From 92512b0b144636b67b041adce8eff6f575bb8369 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Jul 08 2016 14:47:33 +0000 Subject: Fix test_pyexpat failure with Expat 2.2.0 --- diff --git a/00211-fix-test-pyexpat-failure.patch b/00211-fix-test-pyexpat-failure.patch new file mode 100644 index 0000000..7b40280 --- /dev/null +++ b/00211-fix-test-pyexpat-failure.patch @@ -0,0 +1,17 @@ +diff -r 682a8e36dd18 Lib/test/test_pyexpat.py +--- a/Lib/test/test_pyexpat.py Tue Jul 05 17:08:52 2016 +0300 ++++ b/Lib/test/test_pyexpat.py Thu Jul 07 17:04:35 2016 +0800 +@@ -656,11 +656,9 @@ + # \xc2\x85 is UTF-8 encoded U+0085 (NEXT LINE) + xml = b"\r\n" + parser = expat.ParserCreate() +- try: ++ err_pattern = r'XML declaration not well-formed: line 1, column \d+' ++ with self.assertRaisesRegex(expat.ExpatError, err_pattern): + parser.Parse(xml, True) +- self.fail() +- except expat.ExpatError as e: +- self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 14') + + class ErrorMessageTest(unittest.TestCase): + def test_codes(self): diff --git a/python3.spec b/python3.spec index 2a88e09..01c9966 100644 --- a/python3.spec +++ b/python3.spec @@ -112,7 +112,7 @@ Summary: Version 3 of the Python programming language aka Python 3000 Name: python3 Version: %{pybasever}.1 -Release: 10%{?dist} +Release: 11%{?dist} License: Python Group: Development/Languages @@ -438,6 +438,12 @@ Patch209: 00209-prevent-buffer-overflow-in-zipimport-module.patch # Raise an error when STARTTLS fails Patch210: 00210-Raise-an-error-when-STARTTLS-fails.patch +# 00211 # +# Fix test breakage with version 2.2.0 of Expat +# rhbz#1353918: https://bugzilla.redhat.com/show_bug.cgi?id=1353918 +# NOT YET FIXED UPSTREAM: http://bugs.python.org/issue27369 +Patch211: 00211-fix-test-pyexpat-failure.patch + # (New patches go here ^^^) # # When adding new patches to "python" and "python3" in Fedora 17 onwards, @@ -687,6 +693,7 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en %patch208 -p1 %patch209 -p1 %patch210 -p1 +%patch211 -p1 # Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there # are many differences between 2.6 and the Python 3 library. @@ -1588,6 +1595,9 @@ rm -fr %{buildroot} # ====================================================== %changelog +* Fri Jul 08 2016 Charalampos Stratakis - 3.5.1-11 +- Fix test_pyexpat failure with Expat version of 2.2.0 + * Fri Jul 08 2016 Miro HronĨok - 3.5.1-10 - Move xml module to system-python-libs