diff --git a/0001-Make-test-suite-support-Expat-2.4.5.patch b/0001-Make-test-suite-support-Expat-2.4.5.patch deleted file mode 100644 index 4e4d7a04293fd542e346f233d5b9a24e795c98d1..0000000000000000000000000000000000000000 --- a/0001-Make-test-suite-support-Expat-2.4.5.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 7da97f61816f3cadaa6788804b22a2434b40e8c5 Mon Sep 17 00:00:00 2001 -From: "Miss Islington (bot)" - <31488909+miss-islington@users.noreply.github.com> -Date: Mon, 21 Feb 2022 08:16:09 -0800 -Subject: [PATCH] bpo-46811: Make test suite support Expat >=2.4.5 (GH-31453) - (GH-31472) - -Curly brackets were never allowed in namespace URIs -according to RFC 3986, and so-called namespace-validating -XML parsers have the right to reject them a invalid URIs. - -libexpat >=2.4.5 has become strcter in that regard due to -related security issues; with ET.XML instantiating a -namespace-aware parser under the hood, this test has no -future in CPython. - -References: -- https://datatracker.ietf.org/doc/html/rfc3968 -- https://www.w3.org/TR/xml-names/ - -Also, test_minidom.py: Support Expat >=2.4.5 -(cherry picked from commit 2cae93832f46b245847bdc252456ddf7742ef45e) - -Co-authored-by: Sebastian Pipping ---- - Lib/test/test_minidom.py | 17 +++++++++++++++-- - Lib/test/test_xml_etree.py | 6 ------ - .../2022-02-20-21-03-31.bpo-46811.8BxgdQ.rst | 1 + - 3 files changed, 16 insertions(+), 8 deletions(-) - create mode 100644 Misc/NEWS.d/next/Library/2022-02-20-21-03-31.bpo-46811.8BxgdQ.rst - -diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py -index 1663b1f1143dd..97620258d82f6 100644 ---- a/Lib/test/test_minidom.py -+++ b/Lib/test/test_minidom.py -@@ -6,10 +6,12 @@ - from test import support - import unittest - -+import pyexpat - import xml.dom.minidom - - from xml.dom.minidom import parse, Node, Document, parseString - from xml.dom.minidom import getDOMImplementation -+from xml.parsers.expat import ExpatError - - - tstfile = support.findfile("test.xml", subdir="xmltestdata") -@@ -1147,7 +1149,13 @@ def testEncodings(self): - - # Verify that character decoding errors raise exceptions instead - # of crashing -- self.assertRaises(UnicodeDecodeError, parseString, -+ if pyexpat.version_info >= (2, 4, 5): -+ self.assertRaises(ExpatError, parseString, -+ b'') -+ self.assertRaises(ExpatError, parseString, -+ b'Comment \xe7a va ? Tr\xe8s bien ?') -+ else: -+ self.assertRaises(UnicodeDecodeError, parseString, - b'Comment \xe7a va ? Tr\xe8s bien ?') - - doc.unlink() -@@ -1609,7 +1617,12 @@ def testEmptyXMLNSValue(self): - self.confirm(doc2.namespaceURI == xml.dom.EMPTY_NAMESPACE) - - def testExceptionOnSpacesInXMLNSValue(self): -- with self.assertRaisesRegex(ValueError, 'Unsupported syntax'): -+ if pyexpat.version_info >= (2, 4, 5): -+ context = self.assertRaisesRegex(ExpatError, 'syntax error') -+ else: -+ context = self.assertRaisesRegex(ValueError, 'Unsupported syntax') -+ -+ with context: - parseString('') - - def testDocRemoveChild(self): -diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py -index a25f536134c7b..c5292b5e9ef68 100644 ---- a/Lib/test/test_xml_etree.py -+++ b/Lib/test/test_xml_etree.py -@@ -2192,12 +2192,6 @@ def test_issue6233(self): - b"\n" - b'tãg') - -- def test_issue3151(self): -- e = ET.XML('') -- self.assertEqual(e.tag, '{${stuff}}localname') -- t = ET.ElementTree(e) -- self.assertEqual(ET.tostring(e), b'') -- - def test_issue6565(self): - elem = ET.XML("") - self.assertEqual(summarize_list(elem), ['tag']) -diff --git a/Misc/NEWS.d/next/Library/2022-02-20-21-03-31.bpo-46811.8BxgdQ.rst b/Misc/NEWS.d/next/Library/2022-02-20-21-03-31.bpo-46811.8BxgdQ.rst -new file mode 100644 -index 0000000000000..6969bd1898f65 ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2022-02-20-21-03-31.bpo-46811.8BxgdQ.rst -@@ -0,0 +1 @@ -+Make test suite support Expat >=2.4.5 diff --git a/0002-3.10-bpo-46513-Remove-AC_C_CHAR_UNSIGNED-__CHAR_UNSI.patch b/0002-3.10-bpo-46513-Remove-AC_C_CHAR_UNSIGNED-__CHAR_UNSI.patch deleted file mode 100644 index e8d88b31cde401c6889f9bd9e7934c034657adcc..0000000000000000000000000000000000000000 --- a/0002-3.10-bpo-46513-Remove-AC_C_CHAR_UNSIGNED-__CHAR_UNSI.patch +++ /dev/null @@ -1,117 +0,0 @@ -From 4371fbd4328781496f5f2c6938c4d9a84049b187 Mon Sep 17 00:00:00 2001 -From: Christian Heimes -Date: Wed, 26 Jan 2022 13:20:31 +0200 -Subject: [PATCH] [3.10] bpo-46513: Remove AC_C_CHAR_UNSIGNED / - __CHAR_UNSIGNED__ (GH-30851) (GH-30914) - -Co-authored-by: Christian Heimes ---- - .../2022-01-25-12-32-37.bpo-46513.mPm9B4.rst | 2 ++ - Modules/audioop.c | 7 ---- - configure | 33 ------------------- - configure.ac | 1 - - pyconfig.h.in | 5 --- - 5 files changed, 2 insertions(+), 46 deletions(-) - create mode 100644 Misc/NEWS.d/next/Build/2022-01-25-12-32-37.bpo-46513.mPm9B4.rst - -diff --git a/Misc/NEWS.d/next/Build/2022-01-25-12-32-37.bpo-46513.mPm9B4.rst b/Misc/NEWS.d/next/Build/2022-01-25-12-32-37.bpo-46513.mPm9B4.rst -new file mode 100644 -index 0000000000..b8986ae31a ---- /dev/null -+++ b/Misc/NEWS.d/next/Build/2022-01-25-12-32-37.bpo-46513.mPm9B4.rst -@@ -0,0 +1,2 @@ -+:program:`configure` no longer uses ``AC_C_CHAR_UNSIGNED`` macro and -+``pyconfig.h`` no longer defines reserved symbol ``__CHAR_UNSIGNED__``. -diff --git a/Modules/audioop.c b/Modules/audioop.c -index 3aeb6f04f1..2a5d805c05 100644 ---- a/Modules/audioop.c -+++ b/Modules/audioop.c -@@ -5,13 +5,6 @@ - - #include "Python.h" - --#if defined(__CHAR_UNSIGNED__) --#if defined(signed) --/* This module currently does not work on systems where only unsigned -- characters are available. Take it out of Setup. Sorry. */ --#endif --#endif -- - static const int maxvals[] = {0, 0x7F, 0x7FFF, 0x7FFFFF, 0x7FFFFFFF}; - /* -1 trick is needed on Windows to support -0x80000000 without a warning */ - static const int minvals[] = {0, -0x80, -0x8000, -0x800000, -0x7FFFFFFF-1}; -diff --git a/configure b/configure -index a7d2975f1f..e68e00b0b3 100755 ---- a/configure -+++ b/configure -@@ -14183,39 +14183,6 @@ fi - - # checks for compiler characteristics - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 --$as_echo_n "checking whether char is unsigned... " >&6; } --if ${ac_cv_c_char_unsigned+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --$ac_includes_default --int --main () --{ --static int test_array [1 - 2 * !(((char) -1) < 0)]; --test_array [0] = 0; --return test_array [0]; -- -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_c_char_unsigned=no --else -- ac_cv_c_char_unsigned=yes --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 --$as_echo "$ac_cv_c_char_unsigned" >&6; } --if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then -- $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h -- --fi -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 - $as_echo_n "checking for an ANSI C-conforming const... " >&6; } - if ${ac_cv_c_const+:} false; then : -diff --git a/configure.ac b/configure.ac -index 5aa91cbad3..0efeb8f585 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4322,7 +4322,6 @@ fi - - # checks for compiler characteristics - --AC_C_CHAR_UNSIGNED - AC_C_CONST - - works=no -diff --git a/pyconfig.h.in b/pyconfig.h.in -index b97b8f8bf8..8a4aeda646 100644 ---- a/pyconfig.h.in -+++ b/pyconfig.h.in -@@ -1656,11 +1656,6 @@ - /* Define on FreeBSD to activate all library features */ - #undef __BSD_VISIBLE - --/* Define to 1 if type `char' is unsigned and you are not using gcc. */ --#ifndef __CHAR_UNSIGNED__ --# undef __CHAR_UNSIGNED__ --#endif -- - /* Define to 'long' if doesn't define. */ - #undef clock_t - --- -2.19.1.6.gb485710b - diff --git a/Python-3.10.2.tar.xz b/Python-3.10.6.tar.xz similarity index 65% rename from Python-3.10.2.tar.xz rename to Python-3.10.6.tar.xz index c35c1fc12a86bbc9b3c7242a28489bacf2d52675..e55aa4edd50edaded2768e452aa77ad0b91712aa 100644 Binary files a/Python-3.10.2.tar.xz and b/Python-3.10.6.tar.xz differ diff --git a/python3.spec b/python3.spec index d474e5d709a09b3fac429564e35dbb27d0a23936..7e212410bd53c220dfcc511db7b207d781be25a2 100644 --- a/python3.spec +++ b/python3.spec @@ -1,7 +1,4 @@ -# ================== -# Top-level metadata -# ================== -%define anolis_release 2 +%define anolis_release 1 %global pybasever 3.10 # pybasever without the dot: @@ -13,10 +10,9 @@ URL: https://www.python.org/ # WARNING When rebasing to a new Python version, # remember to update the python3-docs package as well -%global general_version %{pybasever}.2 -#global prerel ... -%global upstream_version %{general_version}%{?prerel} -Version: %{general_version}%{?prerel:~%{prerel}} +%global general_version %{pybasever}.6 +%global upstream_version %{general_version} +Version: %{general_version} Release: %{anolis_release}%{?dist} License: Python @@ -53,8 +49,8 @@ License: Python # If the rpmwheels condition is disabled, we use the bundled wheel packages # from Python with the versions below. # This needs to be manually updated when we update Python. -%global pip_version 21.2.4 -%global setuptools_version 58.1.0 +%global pip_version 22.2.1 +%global setuptools_version 63.2.0 # Expensive optimizations (mainly, profile-guided optimizations) %bcond_without optimizations @@ -231,9 +227,6 @@ BuildRequires: python3-rpm-generators Source0: %{url}ftp/python/%{general_version}/Python-%{upstream_version}.tar.xz -Patch0001: 0001-Make-test-suite-support-Expat-2.4.5.patch -Patch0002: 0002-3.10-bpo-46513-Remove-AC_C_CHAR_UNSIGNED-__CHAR_UNSI.patch - # ========================================== # Descriptions, and metadata for subpackages # ========================================== @@ -256,7 +249,6 @@ Summary: Python %{pybasever} interpreter # non-default versions of Python 3. # For consistency, we provide python3.X from python3 as well. Provides: python%{pybasever} = %{version}-%{release} -Provides: python%{pybasever}%{?_isa} = %{version}-%{release} # To keep the upgrade path clean, we Obsolete python3.X. # Note that using Obsoletes without package version is not standard practice. # Here we assert that *any* version of the system's default interpreter is @@ -284,7 +276,7 @@ Obsoletes: python%{pyshortver} < %{version}-%{release} # depend on python(abi). Provide that here. Provides: python(abi) = %{pybasever} -Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release} +Requires: %{pkgname}-libs = %{version}-%{release} # This prevents ALL subpackages built from this spec to require # /usr/bin/python3* or python(abi). Granularity per subpackage is impossible. @@ -351,12 +343,12 @@ Provides: bundled(python3dist(setuptools)) = %{setuptools_version} # We've filtered the automatic requirement out so libs are installable without # the main package. This however makes it pulled in by default. # See https://bugzilla.redhat.com/show_bug.cgi?id=1547131 -Recommends: %{pkgname}%{?_isa} = %{version}-%{release} +Recommends: %{pkgname} = %{version}-%{release} # tkinter is part of the standard library, # but it is torn out to save an unwanted dependency on tk and X11. # we recommend it when tk is already installed (for better UX) -Recommends: (%{pkgname}-tkinter%{?_isa} = %{version}-%{release} if tk%{?_isa}) +Recommends: (%{pkgname}-tkinter = %{version}-%{release} if tk) # The zoneinfo module needs tzdata Requires: tzdata @@ -376,7 +368,7 @@ This package contains runtime libraries for use by Python: %package -n %{pkgname}-devel Summary: Libraries and header files needed for Python development Requires: %{pkgname} = %{version}-%{release} -Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release} +Requires: %{pkgname}-libs = %{version}-%{release} # The RPM related dependencies bring nothing to a non-RPM Python developer # But we want them when packages BuildRequire python3-devel # 3.10-9 macros started to set $RPM_BUILD_ROOT when expanding macros like %%python3_sitearch, @@ -415,7 +407,6 @@ Provides: idle3 = %{version}-%{release} Provides: idle = %{version}-%{release} Provides: %{pkgname}-tools = %{version}-%{release} -Provides: %{pkgname}-tools%{?_isa} = %{version}-%{release} Obsoletes: %{pkgname}-tools < %{version}-%{release} %description -n %{pkgname}-idle @@ -447,7 +438,7 @@ the Python programming language. %package -n %{pkgname}-test Summary: The self-test suite for the main python3 package Requires: %{pkgname} = %{version}-%{release} -Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release} +Requires: %{pkgname}-libs = %{version}-%{release} %description -n %{pkgname}-test The self-test suite for the Python interpreter. @@ -464,12 +455,12 @@ Summary: Debug version of the Python runtime # The debug build is an all-in-one package version of the regular build, and # shares the same .py/.pyc files and directories as the regular build. Hence # we depend on all of the subpackages of the regular build: -Requires: %{pkgname}%{?_isa} = %{version}-%{release} -Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release} -Requires: %{pkgname}-devel%{?_isa} = %{version}-%{release} -Requires: %{pkgname}-test%{?_isa} = %{version}-%{release} -Requires: %{pkgname}-tkinter%{?_isa} = %{version}-%{release} -Requires: %{pkgname}-idle%{?_isa} = %{version}-%{release} +Requires: %{pkgname} = %{version}-%{release} +Requires: %{pkgname}-libs = %{version}-%{release} +Requires: %{pkgname}-devel = %{version}-%{release} +Requires: %{pkgname}-test = %{version}-%{release} +Requires: %{pkgname}-tkinter = %{version}-%{release} +Requires: %{pkgname}-idle = %{version}-%{release} %description -n %{pkgname}-debug python3-debug provides a version of the Python runtime with numerous debugging @@ -707,17 +698,6 @@ DirHoldingGdbPy=%{_usr}/lib/debug/%{_libdir} mkdir -p %{buildroot}$DirHoldingGdbPy %endif # with gdb_hooks -# Multilib support for pyconfig.h -# 32- and 64-bit versions of pyconfig.h are different. For multilib support -# (making it possible to install 32- and 64-bit versions simultaneously), -# we need to install them under different filenames, and to make the common -# "pyconfig.h" include the right file based on architecture. -# See https://bugzilla.redhat.com/show_bug.cgi?id=192747 -# Filanames are defined here: -%global _pyconfig32_h pyconfig-32.h -%global _pyconfig64_h pyconfig-64.h -%global _pyconfig_h pyconfig-%{__isa_bits}.h - # Use a common function to do an install for all our configurations: InstallPython() { @@ -748,21 +728,6 @@ InstallPython() { %{buildroot}%{_bindir}/python${LDVersion}-config chmod +x %{buildroot}%{_bindir}/python${LDVersion}-config - # Make python3-devel multilib-ready - mv %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h \ - %{buildroot}%{_includedir}/python${LDVersion}/%{_pyconfig_h} - cat > %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h << EOF -#include - -#if __WORDSIZE == 32 -#include "%{_pyconfig32_h}" -#elif __WORDSIZE == 64 -#include "%{_pyconfig64_h}" -#else -#error "Unknown word size" -#endif -EOF - echo FINISHED: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName } @@ -792,17 +757,6 @@ install -d -m 0755 %{buildroot}%{pylibdir}/site-packages/__pycache__ install -d -m 0755 %{buildroot}%{_prefix}/lib/python%{pybasever}/site-packages/__pycache__ %endif -# Make sure distutils looks at the right pyconfig.h file -# See https://bugzilla.redhat.com/show_bug.cgi?id=201434 -# Similar for sysconfig: sysconfig.get_config_h_filename tries to locate -# pyconfig.h so it can be parsed, and needs to do this at runtime in site.py -# when python starts up (see https://bugzilla.redhat.com/show_bug.cgi?id=653058) -# -# Split this out so it goes directly to the pyconfig-32.h/pyconfig-64.h -# variants: -sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \ - %{buildroot}%{pylibdir}/distutils/sysconfig.py \ - %{buildroot}%{pylibdir}/sysconfig.py # Install pathfix.py to bindir cp -p Tools/scripts/pathfix.py %{buildroot}%{_bindir}/pathfix%{pybasever}.py @@ -1231,7 +1185,6 @@ CheckPython optimized %dir %{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/ %{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/Makefile %dir %{_includedir}/python%{LDVERSION_optimized}/ -%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h} %{_libdir}/%{py_INSTSONAME_optimized} %if %{with main_python} @@ -1246,7 +1199,6 @@ CheckPython optimized %{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/* %if %{without flatpackage} %exclude %{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/Makefile -%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h} %endif %{_includedir}/python%{LDVERSION_optimized}/*.h %{_includedir}/python%{LDVERSION_optimized}/internal/ @@ -1480,6 +1432,9 @@ CheckPython optimized # ====================================================== %changelog +* Tue Aug 30 2022 Chunmei Xu - 3.10.6-1 +- update to 3.10.6 + * Tue May 17 2022 Chunmei Xu - 3.10.2-2 - Remove AC_C_CHAR_UNSIGNED and __CHAR_UNSIGNED__