From ec208c83f9353e333cef9c81a6f95877ce1fd5b30b77a654a622a0a2d685f8e7 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 1 Oct 2024 15:35:43 +0000 Subject: [PATCH 1/6] =?UTF-8?q?-=20Update=20to=203.12.7:=20=20=20-=20Tests?= =?UTF-8?q?=20=20=20=20=20-=20gh-124378:=20Updated=20test=5Fttk=20to=20pas?= =?UTF-8?q?s=20with=20Tcl/Tk=208.6.15.=20=20=20-=20Security=20=20=20=20=20?= =?UTF-8?q?-=20gh-122792:=20Changed=20IPv4-mapped=20ipaddress.IPv6Address?= =?UTF-8?q?=20to=20=20=20=20=20=20=20consistently=20use=20the=20mapped=20I?= =?UTF-8?q?Pv4=20address=20value=20for=20deciding=20=20=20=20=20=20=20prop?= =?UTF-8?q?erties.=20Properties=20which=20have=20their=20behavior=20fixed?= =?UTF-8?q?=20are=20=20=20=20=20=20=20is=5Fmulticast,=20is=5Freserved,=20i?= =?UTF-8?q?s=5Flink=5Flocal,=20is=5Fglobal,=20and=20=20=20=20=20=20=20is?= =?UTF-8?q?=5Funspecified.=20=20=20-=20Library=20=20=20=20=20-=20gh-116850?= =?UTF-8?q?:=20Fix=20argparse=20for=20namespaces=20with=20not=20directly?= =?UTF-8?q?=20=20=20=20=20=20=20writable=20dict=20(e.g.=20classes).=20=20?= =?UTF-8?q?=20=20=20-=20gh-58573:=20Fix=20conflicts=20between=20abbreviate?= =?UTF-8?q?d=20long=20options=20in=20=20=20=20=20=20=20the=20parent=20pars?= =?UTF-8?q?er=20and=20subparsers=20in=20argparse.=20=20=20=20=20-=20gh-611?= =?UTF-8?q?81:=20Fix=20support=20of=20choices=20with=20string=20value=20in?= =?UTF-8?q?=20=20=20=20=20=20=20argparse.=20Substrings=20of=20the=20specif?= =?UTF-8?q?ied=20string=20no=20longer=20=20=20=20=20=20=20considered=20val?= =?UTF-8?q?id=20values.=20=20=20=20=20-=20gh-80259:=20Fix=20argparse=20sup?= =?UTF-8?q?port=20of=20positional=20arguments=20with=20=20=20=20=20=20=20n?= =?UTF-8?q?args=3D'=3F',=20default=3Dargparse.SUPPRESS=20and=20specified?= =?UTF-8?q?=20type.=20=20=20=20=20-=20gh-124498:=20Fix=20typing.TypeAliasT?= =?UTF-8?q?ype=20not=20to=20be=20generic,=20when=20=20=20=20=20=20=20type?= =?UTF-8?q?=5Fparams=20is=20an=20empty=20tuple.=20=20=20=20=20-=20gh-12434?= =?UTF-8?q?5:=20argparse=20vim=20supports=20abbreviated=20single-dash=20?= =?UTF-8?q?=20=20=20=20=20=20long=20options=20separated=20by=20=3D=20from?= =?UTF-8?q?=20its=20value.=20=20=20=20=20-=20gh-104860:=20Fix=20disallowin?= =?UTF-8?q?g=20abbreviation=20of=20single-dash=20long=20=20=20=20=20=20=20?= =?UTF-8?q?options=20in=20argparse=20with=20allow=5Fabbrev=3DFalse.=20=20?= =?UTF-8?q?=20=20=20-=20gh-63143:=20Fix=20parsing=20mutually=20exclusive?= =?UTF-8?q?=20arguments=20in=20=20=20=20=20=20=20argparse.=20Arguments=20w?= =?UTF-8?q?ith=20the=20value=20identical=20to=20the=20default=20=20=20=20?= =?UTF-8?q?=20=20=20value=20(e.g.=20booleans,=20small=20integers,=20empty?= =?UTF-8?q?=20or=201-character=20=20=20=20=20=20=20strings)=20are=20no=20l?= =?UTF-8?q?onger=20considered=20=E2=80=9Cnot=20present=E2=80=9D.=20=20=20?= =?UTF-8?q?=20=20-=20gh-72795:=20Positional=20arguments=20with=20nargs=20e?= =?UTF-8?q?qual=20to=20'*'=20or?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python312?expand=0&rev=71 --- Python-3.12.6.tar.xz | 3 - Python-3.12.6.tar.xz.asc | 18 ---- Python-3.12.7.tar.xz | 3 + Python-3.12.7.tar.xz.asc | 18 ++++ doc-py38-to-py36.patch | 12 +-- fix_configure_rst.patch | 2 +- python-3.3.0b1-test-posix_fadvise.patch | 8 +- python312.changes | 113 ++++++++++++++++++++++++ python312.spec | 4 +- 9 files changed, 146 insertions(+), 35 deletions(-) delete mode 100644 Python-3.12.6.tar.xz delete mode 100644 Python-3.12.6.tar.xz.asc create mode 100644 Python-3.12.7.tar.xz create mode 100644 Python-3.12.7.tar.xz.asc diff --git a/Python-3.12.6.tar.xz b/Python-3.12.6.tar.xz deleted file mode 100644 index 05c1431..0000000 --- a/Python-3.12.6.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1999658298cf2fb837dffed8ff3c033ef0c98ef20cf73c5d5f66bed5ab89697c -size 20434028 diff --git a/Python-3.12.6.tar.xz.asc b/Python-3.12.6.tar.xz.asc deleted file mode 100644 index d7f5905..0000000 --- a/Python-3.12.6.tar.xz.asc +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQKTBAABCgB9FiEEcWlgX2LHUTVtBUomqCHmgOX6YwUFAmbbZv1fFIAAAAAALgAo -aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDcx -Njk2MDVGNjJDNzUxMzU2RDA1NEEyNkE4MjFFNjgwRTVGQTYzMDUACgkQqCHmgOX6 -YwV51g//WpQjF/Rt19lgaWojZ3qDkvmTM2kpvfDGLe9Tkm1fWYzji4TLS3TnzGEp -dw2K6ApqGX4aO9AKMBRdfiFyhaDp0ENlBzSspvyzVT4LsRxiWXqyJ1qZB9mui/S8 -k5pw2qygaS4gYEAOLrVEwmQ52pig1wMAouSmRuopVk5DGYUN6Wir7RZMrYynsd6P -6HYqpZby2L1fKlcj2xYY44niuL5a+I8ucWN9qOBzRLCuzq20lVoII817vORjCqa7 -ZUMKrDXDlzHnISNqZyyX37/oi6a8UdNm0o8V9yDJLiBu9+Dy3OueoIguuzimk4hq -ZnepBoCcr2YAxIsXvwl2qfQBOCjJ5WAZ/wzA/eQMo9Jn1TYRBwuMC1MmP0ylt7Me -/pS57bGuulkfPv9pMto7qc2lNpotBmAsfGJAJMczeEmyo5tAXnJUBE94JRmiLaR/ -zwPmJB3O9uEQhEa8+cjx4+9bK6+YvAXkb9x92Wn70u+IaalPj8CRA7B45hy1KYHT -5s/ndwFFWThxqxH61oqjPvlZW5PWBC83yi/KovhgDWNL2G9CTusKevMqX/LMUAKz -M3mJU/24vUu9bJNxB2qsa3UeP8hbb6WN5LLQyxRsXPjVQ9iTeMWrQkz1mRGIK2Ec -OFbYH2SGa/RELds6MZWzvZuXIefCoyuc51WsXnc4LFr2ZGv4dAI= -=CK1W ------END PGP SIGNATURE----- diff --git a/Python-3.12.7.tar.xz b/Python-3.12.7.tar.xz new file mode 100644 index 0000000..cedefbf --- /dev/null +++ b/Python-3.12.7.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 +size 20444032 diff --git a/Python-3.12.7.tar.xz.asc b/Python-3.12.7.tar.xz.asc new file mode 100644 index 0000000..e356604 --- /dev/null +++ b/Python-3.12.7.tar.xz.asc @@ -0,0 +1,18 @@ +-----BEGIN PGP SIGNATURE----- + +iQKTBAABCgB9FiEEcWlgX2LHUTVtBUomqCHmgOX6YwUFAmb7fPtfFIAAAAAALgAo +aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDcx +Njk2MDVGNjJDNzUxMzU2RDA1NEEyNkE4MjFFNjgwRTVGQTYzMDUACgkQqCHmgOX6 +YwUVbw//ZIkOgBaCTVKbjfLbOj9aui1v4kFEex0AB4H/RdmJwrO4S+p76UuHb2c3 +eG65uL8KWwo1CmX7O62YFVjVkMCaYn5J96ReDVP4XygglYv1HtxFhOwH9OhsAjhT +1HIvdx22mO+xpqMBus5+1W6pwgfmMV6eWvVQasDp3mXPRv/x7imjZUfT5sr8kH49 +BWztinQ3PIN4JsPdAXGT/H08FVR5zC/4BG5GRMcDH+g5kqFCF97TxLoY2auP8XS+ +WDAomj5wfPdsGk5CDZ5ImRikwJlsr5A9QZxCv4FWH4j4ndUr/i9Spuut9t+hBgrd +jYc2vMPkm97RDlSd78Bfz5kUCH9hJSC3r/kpa0rk1QLKHk8h8OGMgXG4FLGl4hVw +M/NZQ9A7A6FDApvLXc5CbTEpgRlldkIr2kae9KR803E28sdEl6pQqr0lvhoLPe5i +OhPvsmJdazIo/R7AJkNdmU7T+E0Ikova3TOxVyr3ryyjW4UrppIdxiWeAJ8ood4U +tcJ1Dq9+Zj5oo/88TR/KwkYrM7FFUKRa1AgirUk88v+16z2qVgf0cSUAW10rTWAZ +FP8K+ADR31AXAQrxLOAzaP/NXgAjRuTmuTLrdWE5K+kbSTKbUigKY4z+IKVvq/qA +SoN2v6/22do+z4OQMnPDGBU3t8iTqIeuvOMCfYsQBTAZqqq5y4Q= +=kx8a +-----END PGP SIGNATURE----- diff --git a/doc-py38-to-py36.patch b/doc-py38-to-py36.patch index 0c25318..7d90d28 100644 --- a/doc-py38-to-py36.patch +++ b/doc-py38-to-py36.patch @@ -18,7 +18,7 @@ # Create table of contents entries for domain objects (e.g. functions, classes, # attributes, etc.). Default is True. -@@ -328,7 +328,7 @@ html_short_title = f'{release} Documenta +@@ -329,7 +329,7 @@ html_short_title = f'{release} Documenta # (See .readthedocs.yml and https://docs.readthedocs.io/en/stable/reference/environment-variables.html) is_deployment_preview = os.getenv("READTHEDOCS_VERSION_TYPE") == "external" repository_url = os.getenv("READTHEDOCS_GIT_CLONE_URL", "") @@ -251,7 +251,7 @@ stable_abi_data = {} with open(stable_abi_file, encoding="utf8") as fp: for record in csv.DictReader(fp): -@@ -135,7 +131,8 @@ def add_annotations(app: Sphinx, doctree +@@ -132,7 +128,8 @@ def add_annotations(app: Sphinx, doctree objtype = par["objtype"] # Stable ABI annotation. @@ -261,7 +261,7 @@ if ROLE_TO_OBJECT_TYPE[record.role] != objtype: msg = ( f"Object type mismatch in limited API annotation for {name}: " -@@ -242,7 +239,7 @@ def _unstable_api_annotation() -> nodes. +@@ -239,7 +236,7 @@ def _unstable_api_annotation() -> nodes. ) @@ -270,7 +270,7 @@ classes = ["refcount"] if result_refs is None: rc = sphinx_gettext("Return value: Always NULL.") -@@ -262,7 +259,7 @@ class LimitedAPIList(SphinxDirective): +@@ -259,7 +256,7 @@ class LimitedAPIList(SphinxDirective): optional_arguments = 0 final_argument_whitespace = True @@ -279,7 +279,7 @@ state = self.env.domaindata["c_annotations"] content = [ f"* :c:{record.role}:`{record.name}`" -@@ -285,7 +282,7 @@ def init_annotations(app: Sphinx) -> Non +@@ -282,7 +279,7 @@ def init_annotations(app: Sphinx) -> Non ) @@ -288,7 +288,7 @@ app.add_config_value("refcount_file", "", "env", types={str}) app.add_config_value("stable_abi_file", "", "env", types={str}) app.add_directive("limited-api-list", LimitedAPIList) -@@ -297,10 +294,10 @@ def setup(app: Sphinx) -> ExtensionMetad +@@ -294,10 +291,10 @@ def setup(app: Sphinx) -> ExtensionMetad from sphinx.domains.c import CObject # monkey-patch C object... diff --git a/fix_configure_rst.patch b/fix_configure_rst.patch index 87bd42d..5620ac0 100644 --- a/fix_configure_rst.patch +++ b/fix_configure_rst.patch @@ -21,7 +21,7 @@ Create a Python.framework rather than a traditional Unix install. Optional --- a/Misc/NEWS +++ b/Misc/NEWS -@@ -13974,7 +13974,7 @@ C API +@@ -14138,7 +14138,7 @@ C API - bpo-40939: Removed documentation for the removed ``PyParser_*`` C API. - bpo-43795: The list in :ref:`limited-api-list` now shows the public name diff --git a/python-3.3.0b1-test-posix_fadvise.patch b/python-3.3.0b1-test-posix_fadvise.patch index 2735034..81c0deb 100644 --- a/python-3.3.0b1-test-posix_fadvise.patch +++ b/python-3.3.0b1-test-posix_fadvise.patch @@ -2,11 +2,9 @@ Lib/test/test_posix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: Python-3.12.2/Lib/test/test_posix.py -=================================================================== ---- Python-3.12.2.orig/Lib/test/test_posix.py -+++ Python-3.12.2/Lib/test/test_posix.py -@@ -433,7 +433,7 @@ class PosixTester(unittest.TestCase): +--- a/Lib/test/test_posix.py ++++ b/Lib/test/test_posix.py +@@ -435,7 +435,7 @@ class PosixTester(unittest.TestCase): def test_posix_fadvise(self): fd = os.open(os_helper.TESTFN, os.O_RDONLY) try: diff --git a/python312.changes b/python312.changes index 9e42749..033ffbf 100644 --- a/python312.changes +++ b/python312.changes @@ -1,3 +1,116 @@ +------------------------------------------------------------------- +Tue Oct 1 15:32:06 UTC 2024 - Matej Cepl + +- Update to 3.12.7: + - Tests + - gh-124378: Updated test_ttk to pass with Tcl/Tk 8.6.15. + - Security + - gh-122792: Changed IPv4-mapped ipaddress.IPv6Address to + consistently use the mapped IPv4 address value for deciding + properties. Properties which have their behavior fixed are + is_multicast, is_reserved, is_link_local, is_global, and + is_unspecified. + - Library + - gh-116850: Fix argparse for namespaces with not directly + writable dict (e.g. classes). + - gh-58573: Fix conflicts between abbreviated long options in + the parent parser and subparsers in argparse. + - gh-61181: Fix support of choices with string value in + argparse. Substrings of the specified string no longer + considered valid values. + - gh-80259: Fix argparse support of positional arguments with + nargs='?', default=argparse.SUPPRESS and specified type. + - gh-124498: Fix typing.TypeAliasType not to be generic, when + type_params is an empty tuple. + - gh-124345: argparse vim supports abbreviated single-dash + long options separated by = from its value. + - gh-104860: Fix disallowing abbreviation of single-dash long + options in argparse with allow_abbrev=False. + - gh-63143: Fix parsing mutually exclusive arguments in + argparse. Arguments with the value identical to the default + value (e.g. booleans, small integers, empty or 1-character + strings) are no longer considered “not present”. + - gh-72795: Positional arguments with nargs equal to '*' or + argparse.REMAINDER are no longer required. This allows to + use positional argument with nargs='*' and without default + in mutually exclusive group and improves error message + about required arguments. + - gh-59317: Fix parsing positional argument with nargs equal + to '?' or '*' if it is preceded by an option and another + positional argument. + - gh-53780: argparse now ignores the first "--" (double dash) + between an option and command. + - gh-124217: Add RFC 9637 reserved IPv6 block 3fff::/20 in + ipaddress module. + - gh-124248: Fixed potential crash when using struct to + process zero-width ‘Pascal string’ fields (0p). + - gh-81691: Fix handling of multiple "--" (double dashes) + in argparse. Only the first one has now been removed, all + subsequent ones are now taken literally. + - gh-87041: Fix a bug in argparse where lengthy subparser + argument help is incorrectly indented. + - gh-124171: Add workaround for broken fmod() implementations + on Windows, that loose zero sign (e.g. fmod(-10, 1) returns + 0.0). Patch by Sergey B Kirpichev. + - gh-123934: Fix unittest.mock.MagicMock reseting magic + methods return values after .reset_mock(return_value=True) + was called. + - gh-123935: Fix parent slots detection for dataclasses that + inherit from classes with __dictoffset__. + - gh-123892: Add "_wmi" to sys.stdlib_module_names. Patch by + Victor Stinner. + - gh-116810: Resolve a memory leak introduced in CPython + 3.10’s ssl when the ssl.SSLSocket.session property was + accessed. Speeds up read and write access to said property + by no longer unnecessarily cloning session objects via + serialization. + - gh-121735: When working with zip archives, + importlib.resources now properly honors module-adjacent + references (e.g. files(pkg.mod) and not just files(pkg)). + - gh-119004: Fix a crash in OrderedDict.__eq__ when operands + are mutated during the check. Patch by Bénédikt Tran. + - bpo-44864: Do not translate user-provided strings in + argparse.ArgumentParser. + - IDLE + - gh-112938: Fix uninteruptable hang when Shell gets rapid + continuous output. + - Core and Builtins + - gh-116510: Fix a bug that can cause a crash when + sub-interpreters use “basic” single-phase extension + modules. Shared objects could refer to PyGC_Head nodes that + had been freed as part of interpreter cleanup. + - gh-124188: Fix reading and decoding a line from the source + file witn non-UTF-8 encoding for syntax errors raised in + the compiler. + - gh-77894: Fix possible crash in the garbage collector when + it tries to break a reference loop containing a memoryview + object. Now a memoryview object can only be cleared if + there are no buffers that refer it. + - gh-98442: Fix too wide source locations of the cleanup + instructions of a with statement. + - gh-113993: Strings interned with sys.intern() are again + garbage-collected when no longer used, as per the + documentation. Strings interned with the C function + PyUnicode_InternInPlace() are still immortal. Internals of + the string interning mechanism have been changed. This may + affect performance and identities of str objects. + - C API + - gh-113993: PyUnicode_InternInPlace() no longer prevents its + argument from being garbage collected. + - Several functions that take char * are now documented + as possibly preventing string objects from being + garbage collected; refer to their documentation + for details: PyUnicode_InternFromString(), + PyDict_SetItemString(), PyObject_SetAttrString(), + PyObject_DelAttrString(), PyUnicode_InternFromString(), and + PyModule_Add* convenience functions. + - Build + - gh-124487: Windows builds now use Windows 8.1 as their API + baseline (installation already required Windows 8.1). + - gh-123917: Fix the check for the crypt() function in the + configure script. Patch by Paul Smith and Victor Stinner. +- Change previous removal of *.pyc files with rm -f instead of ||/bin/true + ------------------------------------------------------------------- Mon Sep 30 09:42:13 UTC 2024 - Bernhard Wiedemann diff --git a/python312.spec b/python312.spec index 48c39eb..bea016f 100644 --- a/python312.spec +++ b/python312.spec @@ -110,7 +110,7 @@ # _md5.cpython-38m-x86_64-linux-gnu.so %define dynlib() %{sitedir}/lib-dynload/%{1}.cpython-%{abi_tag}-%{archname}-%{_os}%{?_gnu}%{?armsuffix}.so Name: %{python_pkg_name}%{psuffix} -Version: 3.12.6 +Version: 3.12.7 Release: 0 Summary: Python 3 Interpreter License: Python-2.0 @@ -796,7 +796,7 @@ LD_LIBRARY_PATH=. ./python -O -c "from py_compile import compile; compile('$FAIL ) echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-import-failed-hooks.pth %endif -find %{buildroot}%{_docdir}/%{name} -type f -name \*.pyc -delete ||: +find %{buildroot}%{_docdir}/%{name} -type f -name \*.pyc -exec rm -vf '{}' \; %if %{with general} %files -n %{python_pkg_name}-tk From 38ff7e3150000c39fd05b2abb1bcde67cbad66b6381b087dc940ea84fca61c0e Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 1 Oct 2024 21:16:07 +0000 Subject: [PATCH 2/6] Fix the command OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python312?expand=0&rev=72 --- python312.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python312.spec b/python312.spec index bea016f..4f52c97 100644 --- a/python312.spec +++ b/python312.spec @@ -796,7 +796,8 @@ LD_LIBRARY_PATH=. ./python -O -c "from py_compile import compile; compile('$FAIL ) echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-import-failed-hooks.pth %endif -find %{buildroot}%{_docdir}/%{name} -type f -name \*.pyc -exec rm -vf '{}' \; + +find %{buildroot}%{_docdir} -type f -name \*.pyc -ls -exec rm -vf '{}' \; %if %{with general} %files -n %{python_pkg_name}-tk From 2aeb619628ae45deb5362cb83c9bcdc7d9210722b3c60a825a8330c005d8eb10 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 1 Oct 2024 23:40:43 +0000 Subject: [PATCH 3/6] Fix the command OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python312?expand=0&rev=73 --- python312.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python312.spec b/python312.spec index 4f52c97..6bf7cf5 100644 --- a/python312.spec +++ b/python312.spec @@ -797,7 +797,7 @@ LD_LIBRARY_PATH=. ./python -O -c "from py_compile import compile; compile('$FAIL echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-import-failed-hooks.pth %endif -find %{buildroot}%{_docdir} -type f -name \*.pyc -ls -exec rm -vf '{}' \; +find %{buildroot}%{_datadir}/doc -type f -name \*.pyc -ls -exec rm -vf '{}' \; %if %{with general} %files -n %{python_pkg_name}-tk From 957ff7785502b70c829b9574549070f3c42e288cde637d04feb654a276d8328c Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 1 Oct 2024 23:44:23 +0000 Subject: [PATCH 4/6] Fix the command OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python312?expand=0&rev=74 --- python312.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python312.spec b/python312.spec index 6bf7cf5..b040533 100644 --- a/python312.spec +++ b/python312.spec @@ -797,7 +797,9 @@ LD_LIBRARY_PATH=. ./python -O -c "from py_compile import compile; compile('$FAIL echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-import-failed-hooks.pth %endif -find %{buildroot}%{_datadir}/doc -type f -name \*.pyc -ls -exec rm -vf '{}' \; +if [ -d %{buildroot}%{_defaultdocdir} ] ; then +find %{buildroot}%{_defaultdocdir} -type f -name \*.pyc -ls -exec rm -vf '{}' \; +fi %if %{with general} %files -n %{python_pkg_name}-tk From 8c2f054df4c21e61e878996fded9866800fcc7af47bd7c164d32e43e03b6f23a Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 1 Oct 2024 23:45:48 +0000 Subject: [PATCH 5/6] Fix the command OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python312?expand=0&rev=75 --- python312.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python312.spec b/python312.spec index b040533..3efb13f 100644 --- a/python312.spec +++ b/python312.spec @@ -797,6 +797,7 @@ LD_LIBRARY_PATH=. ./python -O -c "from py_compile import compile; compile('$FAIL echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-import-failed-hooks.pth %endif +# For the purposes of reproducibility, it is necessary to eliminate any *.pyc files inside documentation dirs if [ -d %{buildroot}%{_defaultdocdir} ] ; then find %{buildroot}%{_defaultdocdir} -type f -name \*.pyc -ls -exec rm -vf '{}' \; fi From 2f2e1268862458aec017d5d5c082e87ce97f9fb51a1c9ba7d57186f1fdb86414 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 3 Oct 2024 15:01:05 +0000 Subject: [PATCH 6/6] Fix the changelog OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python312?expand=0&rev=76 --- python312.changes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python312.changes b/python312.changes index 033ffbf..193c9b1 100644 --- a/python312.changes +++ b/python312.changes @@ -109,7 +109,8 @@ Tue Oct 1 15:32:06 UTC 2024 - Matej Cepl baseline (installation already required Windows 8.1). - gh-123917: Fix the check for the crypt() function in the configure script. Patch by Paul Smith and Victor Stinner. -- Change previous removal of *.pyc files with rm -f instead of ||/bin/true +- Change previous removal of *.pyc files with rm -f instead of + ||/bin/true (bsc#1230906). ------------------------------------------------------------------- Mon Sep 30 09:42:13 UTC 2024 - Bernhard Wiedemann