diff --git a/00212-fix-test-pyexpat-failure.patch b/00212-fix-test-pyexpat-failure.patch new file mode 100644 index 0000000..7b40280 --- /dev/null +++ b/00212-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 4d7a7ce..336c87e 100644 --- a/python3.spec +++ b/python3.spec @@ -140,7 +140,7 @@ Summary: Version 3 of the Python programming language aka Python 3000 Name: python3 Version: %{pybasever}.3 -Release: 9%{?dist} +Release: 10%{?dist} License: Python Group: Development/Languages @@ -752,6 +752,11 @@ Patch210: 00210-Raise-an-error-when-STARTTLS-fails.patch # Resolves: rhbz#1331392 Patch211: 00211-Disabled-HTTP-header-injections-in-http-client.patch +# 00212 # +# 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 +Patch212: 00212-fix-test-pyexpat-failure.patch # (New patches go here ^^^) # @@ -1047,6 +1052,7 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en %patch209 -p1 %patch210 -p1 %patch211 -p1 +%patch212 -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. @@ -1941,6 +1947,9 @@ rm -fr %{buildroot} # ====================================================== %changelog +* Fri Jul 08 2016 Charalampos Stratakis - 3.4.3-10 +- Fix test_pyexpat failure with Expat version of 2.2.0 + * Fri Jun 24 2016 Tomas Orsava - 3.4.3-9 - Fix CVE-2016-5699 python: http protocol steam injection attack (rhbz#1303699) - Fixed upstream: https://hg.python.org/cpython/rev/bf3e1c9b80e9