Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python312 for openSUSE:Factory 
checked in at 2024-09-26 18:52:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python312 (Old)
 and      /work/SRC/openSUSE:Factory/.python312.new.29891 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python312"

Thu Sep 26 18:52:41 2024 rev:20 rq:1200888 version:3.12.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/python312/python312.changes      2024-08-30 
13:25:44.265786825 +0200
+++ /work/SRC/openSUSE:Factory/.python312.new.29891/python312.changes   
2024-09-26 18:52:58.748317473 +0200
@@ -1,0 +2,111 @@
+Fri Sep 13 17:09:37 UTC 2024 - Matej Cepl <[email protected]>
+
+- Add doc-py38-to-py36.patch making building documentation
+  compatible with Python 3.6, which runs Sphinx on SLE.
+
+-------------------------------------------------------------------
+Sat Sep  7 21:49:34 UTC 2024 - Matej Cepl <[email protected]>
+
+- Update to 3.12.6:
+  - Tests
+    - gh-101525: Skip test_gdb if the binary is relocated by
+      BOLT. Patch by Donghee Na.
+  - Security
+    - gh-123678: Upgrade libexpat to 2.6.3
+    - gh-121285: Remove backtracking from tarfile header parsing
+      for hdrcharset, PAX, and GNU sparse headers (bsc#1230227,
+      CVE-2024-6232).
+  - Library
+    - gh-123270: Applied a more surgical fix for malformed
+      payloads in zipfile.Path causing infinite loops (gh-122905)
+      without breaking contents using legitimate characters
+      (bsc#1229704, CVE-2024-8088).
+    - gh-123213: xml.etree.ElementTree.Element.extend() and
+      Element assignment no longer hide the internal exception if
+      an erronous generator is passed. Patch by Bar Harel.
+    - gh-85110: Preserve relative path in URL without netloc in
+      urllib.parse.urlunsplit() and urllib.parse.urlunparse().
+    - gh-123067: Fix quadratic complexity in parsing "-quoted
+      cookie values with backslashes by http.cookies
+      (bsc#1229596, CVE-2024-7592)
+    - gh-122903: zipfile.Path.glob now correctly matches
+      directories instead of silently omitting them.
+    - gh-122905: zipfile.Path objects now sanitize names from the
+      zipfile.
+    - gh-122695: Fixed double-free when using gc.get_referents()
+      with a freed asyncio.Future iterator.
+    - gh-116263: logging.handlers.RotatingFileHandler no longer
+      rolls over empty log files.
+    - gh-118814: Fix the typing.TypeVar constructor when name is
+      passed by keyword.
+    - gh-122478: Remove internal frames from tracebacks
+      shown in code.InteractiveInterpreter with non-default
+      sys.excepthook(). Save correct tracebacks in
+      sys.last_traceback and update __traceback__ attribute of
+      sys.last_value and sys.last_exc.
+    - gh-113785: csv now correctly parses numeric fields (when
+      used with csv.QUOTE_NONNUMERIC) which start with an escape
+      character.
+    - gh-112182: asyncio.futures.Future.set_exception() now
+      transforms StopIteration into RuntimeError instead of
+      hanging or other misbehavior. Patch contributed by Jamie
+      Phan.
+    - gh-108172: webbrowser honors OS preferred browser on Linux
+      when its desktop entry name contains the text of a known
+      browser name.
+    - gh-102988: email.utils.getaddresses() and
+      email.utils.parseaddr() now return ('', '') 2-tuples
+      in more situations where invalid email addresses are
+      encountered instead of potentially inaccurate values. Add
+      optional strict parameter to these two functions: use
+      strict=False to get the old behavior, accept malformed
+      inputs. getattr(email.utils, 'supports_strict_parsing',
+      False) can be use to check if the strict paramater is
+      available. Patch by Thomas Dwyer and Victor Stinner to
+      improve the CVE-2023-27043 fix.
+    - gh-99437: runpy.run_path() now decodes path-like objects,
+      making sure __file__ and sys.argv[0] of the module being
+      run are always strings.
+  - IDLE
+    - gh-120083: Add explicit black IDLE Hovertip foreground
+      color needed for recent macOS. Fixes Sonoma showing
+      unreadable white on pale yellow. Patch by John Riggles.
+  - Core and Builtins
+    - gh-123321: Prevent Parser/myreadline race condition from
+      segfaulting on multi-threaded use. Patch by Bar Harel and
+      Amit Wienner.
+    - gh-122982: Extend the deprecation period for bool inversion
+      (~) by two years.
+    - gh-123229: Fix valgrind warning by initializing the
+      f-string buffers to 0 in the tokenizer. Patch by Pablo
+      Galindo
+    - gh-123142: Fix too-wide source location in exception
+      tracebacks coming from broken iterables in comprehensions.
+    - gh-123048: Fix a bug where pattern matching code could emit
+      a JUMP_FORWARD with no source location.
+    - gh-123083: Fix a potential use-after-free in
+      STORE_ATTR_WITH_HINT.
+    - gh-122527: Fix a crash that occurred when a
+      PyStructSequence was deallocated after its type’s
+      dictionary was cleared by the GC. The type’s tp_basicsize
+      now accounts for non-sequence fields that aren’t included
+      in the Py_SIZE of the sequence.
+    - gh-93691: Fix source locations of instructions generated
+      for with statements.
+  - Build
+    - gh-123297: Propagate the value of LDFLAGS to LDCXXSHARED in
+      sysconfig. Patch by Pablo Galindo
+- Remove upstreamed patches:
+  - CVE-2023-27043-email-parsing-errors.patch
+  - CVE-2024-8088-inf-loop-zipfile_Path.patch
+  - CVE-2023-6597-TempDir-cleaning-symlink.patch
+  - gh120226-fix-sendfile-test-kernel-610.patch
+
+-------------------------------------------------------------------
+Mon Sep  2 09:44:26 UTC 2024 - Matej Cepl <[email protected]>
+
+- Add gh120226-fix-sendfile-test-kernel-610.patch to avoid
+  failing test_sendfile_close_peer_in_the_middle_of_receiving
+  tests on Linux >= 6.10 (GH-120227).
+
+-------------------------------------------------------------------

Old:
----
  CVE-2023-27043-email-parsing-errors.patch
  CVE-2023-6597-TempDir-cleaning-symlink.patch
  CVE-2024-8088-inf-loop-zipfile_Path.patch
  Python-3.12.5.tar.xz
  Python-3.12.5.tar.xz.asc

New:
----
  Python-3.12.6.tar.xz
  Python-3.12.6.tar.xz.asc
  doc-py38-to-py36.patch

BETA DEBUG BEGIN:
  Old:- Remove upstreamed patches:
  - CVE-2023-27043-email-parsing-errors.patch
  - CVE-2024-8088-inf-loop-zipfile_Path.patch
  Old:  - CVE-2024-8088-inf-loop-zipfile_Path.patch
  - CVE-2023-6597-TempDir-cleaning-symlink.patch
  - gh120226-fix-sendfile-test-kernel-610.patch
  Old:  - CVE-2023-27043-email-parsing-errors.patch
  - CVE-2024-8088-inf-loop-zipfile_Path.patch
  - CVE-2023-6597-TempDir-cleaning-symlink.patch
BETA DEBUG END:

BETA DEBUG BEGIN:
  New:
- Add doc-py38-to-py36.patch making building documentation
  compatible with Python 3.6, which runs Sphinx on SLE.
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python312.spec ++++++
--- /var/tmp/diff_new_pack.DSiTUj/_old  2024-09-26 18:52:59.596352645 +0200
+++ /var/tmp/diff_new_pack.DSiTUj/_new  2024-09-26 18:52:59.600352811 +0200
@@ -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.5
+Version:        3.12.6
 Release:        0
 Summary:        Python 3 Interpreter
 License:        Python-2.0
@@ -168,13 +168,6 @@
 # PATCH-FIX-SLE fix_configure_rst.patch bpo#43774 [email protected]
 # remove duplicate link targets and make documentation with old Sphinx in SLE
 Patch35:        fix_configure_rst.patch
-# PATCH-FIX-UPSTREAM CVE-2023-27043-email-parsing-errors.patch bsc#1210638 
[email protected]
-# Detect email address parsing errors and return empty tuple to
-# indicate the parsing error (old API)
-Patch36:        CVE-2023-27043-email-parsing-errors.patch
-# PATCH-FIX-UPSTREAM CVE-2023-6597-TempDir-cleaning-symlink.patch bsc#1219666 
[email protected]
-# tempfile.TemporaryDirectory: fix symlink bug in cleanup (from 
gh#python/cpython!99930)
-Patch38:        CVE-2023-6597-TempDir-cleaning-symlink.patch
 # PATCH-FIX-OPENSUSE CVE-2023-52425-libexpat-2.6.0-backport-15.6.patch
 # This problem on libexpat is patched on 15.6 without version
 # update, this patch changes the tests to match the libexpat provided
@@ -186,9 +179,9 @@
 # PATCH-FIX-SLE docs-docutils_014-Sphinx_420.patch bsc#[0-9]+ [email protected]
 # related to gh#python/cpython#119317
 Patch41:        docs-docutils_014-Sphinx_420.patch
-# PATCH-FIX-UPSTREAM CVE-2024-8088-inf-loop-zipfile_Path.patch bsc#1229704 
[email protected]
-# avoid denial of service in zipfile
-Patch42:        CVE-2024-8088-inf-loop-zipfile_Path.patch
+# PATCH-FIX-SLE doc-py38-to-py36.patch [email protected]
+# Make documentation extensions working with Python 3.6
+Patch44:        doc-py38-to-py36.patch
 BuildRequires:  autoconf-archive
 BuildRequires:  automake
 BuildRequires:  fdupes
@@ -219,6 +212,9 @@
 BuildRequires:  python3-Sphinx >= 4.0.0
 %if 0%{?suse_version} >= 1500
 BuildRequires:  python3-python-docs-theme >= 2022.1
+%if 0%{?suse_version} < 1599
+BuildRequires:  python3-dataclasses
+%endif
 %endif
 %endif
 %if %{with general}
@@ -480,7 +476,7 @@
 tar xvf %{SOURCE21}
 
 # Don't fail on warnings when building documentation
-# sed -i -e '/^SPHINXERRORHANDLING/s/-W//' Doc/Makefile
+sed -i -e '/^SPHINXERRORHANDLING/s/-W//' Doc/Makefile
 
 %build
 %if %{with doc}

++++++ CVE-2023-52425-libexpat-2.6.0-backport-15.6.patch ++++++
--- /var/tmp/diff_new_pack.DSiTUj/_old  2024-09-26 18:52:59.624353806 +0200
+++ /var/tmp/diff_new_pack.DSiTUj/_new  2024-09-26 18:52:59.628353972 +0200
@@ -1,7 +1,36 @@
-Index: Python-3.12.3/Lib/test/test_xml_etree.py
-===================================================================
---- Python-3.12.3.orig/Lib/test/test_xml_etree.py
-+++ Python-3.12.3/Lib/test/test_xml_etree.py
+---
+ Lib/test/test_pyexpat.py   |    4 ++++
+ Lib/test/test_sax.py       |    3 +++
+ Lib/test/test_xml_etree.py |   10 ++++++++++
+ 3 files changed, 17 insertions(+)
+
+--- a/Lib/test/test_pyexpat.py
++++ b/Lib/test/test_pyexpat.py
+@@ -794,6 +794,10 @@ class ReparseDeferralTest(unittest.TestC
+         self.assertEqual(started, ['doc'])
+ 
+     def test_reparse_deferral_disabled(self):
++        if expat.version_info < (2, 6, 0):
++            self.skipTest(f'Expat {expat.version_info} does not '
++                          'support reparse deferral')
++
+         started = []
+ 
+         def start_element(name, _):
+--- a/Lib/test/test_sax.py
++++ b/Lib/test/test_sax.py
+@@ -1240,6 +1240,9 @@ class ExpatReaderTest(XmlTestBase):
+ 
+         self.assertEqual(result.getvalue(), start + b"<doc></doc>")
+ 
++    @unittest.skipIf(pyexpat.version_info < (2, 6, 0),
++                     f'Expat {pyexpat.version_info} does not '
++                     'support reparse deferral')
+     def test_flush_reparse_deferral_disabled(self):
+         result = BytesIO()
+         xmlgen = XMLGenerator(result)
+--- a/Lib/test/test_xml_etree.py
++++ b/Lib/test/test_xml_etree.py
 @@ -121,6 +121,11 @@ ATTLIST_XML = """\
  </foo>
  """
@@ -36,33 +65,4 @@
      def test_flush_reparse_deferral_disabled(self):
          parser = ET.XMLPullParser(events=('start', 'end'))
  
-Index: Python-3.12.3/Lib/test/test_sax.py
-===================================================================
---- Python-3.12.3.orig/Lib/test/test_sax.py
-+++ Python-3.12.3/Lib/test/test_sax.py
-@@ -1240,6 +1240,9 @@ class ExpatReaderTest(XmlTestBase):
- 
-         self.assertEqual(result.getvalue(), start + b"<doc></doc>")
- 
-+    @unittest.skipIf(pyexpat.version_info < (2, 6, 0),
-+                     f'Expat {pyexpat.version_info} does not '
-+                     'support reparse deferral')
-     def test_flush_reparse_deferral_disabled(self):
-         result = BytesIO()
-         xmlgen = XMLGenerator(result)
-Index: Python-3.12.3/Lib/test/test_pyexpat.py
-===================================================================
---- Python-3.12.3.orig/Lib/test/test_pyexpat.py
-+++ Python-3.12.3/Lib/test/test_pyexpat.py
-@@ -794,6 +794,10 @@ class ReparseDeferralTest(unittest.TestC
-         self.assertEqual(started, ['doc'])
- 
-     def test_reparse_deferral_disabled(self):
-+        if expat.version_info < (2, 6, 0):
-+            self.skipTest(f'Expat {expat.version_info} does not '
-+                          'support reparse deferral')
-+
-         started = []
- 
-         def start_element(name, _):
 

++++++ Python-3.12.5.tar.xz -> Python-3.12.6.tar.xz ++++++
/work/SRC/openSUSE:Factory/python312/Python-3.12.5.tar.xz 
/work/SRC/openSUSE:Factory/.python312.new.29891/Python-3.12.6.tar.xz differ: 
char 26, line 1

++++++ doc-py38-to-py36.patch ++++++
---
 Doc/conf.py                             |    4 +-
 Doc/tools/check-warnings.py             |    3 +
 Doc/tools/extensions/audit_events.py    |   54 ++++++++++++++++----------------
 Doc/tools/extensions/c_annotations.py   |   33 ++++++++-----------
 Doc/tools/extensions/glossary_search.py |   10 +----
 Doc/tools/extensions/patchlevel.py      |    9 ++---
 6 files changed, 55 insertions(+), 58 deletions(-)

--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -76,7 +76,7 @@ today_fmt = '%B %d, %Y'
 highlight_language = 'python3'
 
 # Minimum version of sphinx required
-needs_sphinx = '6.2.1'
+needs_sphinx = '4.2.0'
 
 # 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
 # (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", "")
-repository_url = repository_url.removesuffix(".git")
+repository_url = repository_url[:-len(".git")]
 html_context = {
     "is_deployment_preview": is_deployment_preview,
     "repository_url": repository_url or None,
--- a/Doc/tools/check-warnings.py
+++ b/Doc/tools/check-warnings.py
@@ -228,7 +228,8 @@ def fail_if_regression(
             print(filename)
             for warning in warnings:
                 if filename in warning:
-                    if match := WARNING_PATTERN.fullmatch(warning):
+                    match = WARNING_PATTERN.fullmatch(warning)
+                    if match:
                         print("  {line}: {msg}".format_map(match))
         return -1
     return 0
--- a/Doc/tools/extensions/audit_events.py
+++ b/Doc/tools/extensions/audit_events.py
@@ -1,9 +1,6 @@
 """Support for documenting audit events."""
 
-from __future__ import annotations
-
 import re
-from typing import TYPE_CHECKING
 
 from docutils import nodes
 from sphinx.errors import NoUri
@@ -12,12 +9,11 @@ from sphinx.transforms.post_transforms i
 from sphinx.util import logging
 from sphinx.util.docutils import SphinxDirective
 
-if TYPE_CHECKING:
-    from collections.abc import Iterator
+from typing import Any, List, Tuple
 
-    from sphinx.application import Sphinx
-    from sphinx.builders import Builder
-    from sphinx.environment import BuildEnvironment
+from sphinx.application import Sphinx
+from sphinx.builders import Builder
+from sphinx.environment import BuildEnvironment
 
 logger = logging.getLogger(__name__)
 
@@ -32,16 +28,16 @@ _SYNONYMS = [
 
 class AuditEvents:
     def __init__(self) -> None:
-        self.events: dict[str, list[str]] = {}
-        self.sources: dict[str, list[tuple[str, str]]] = {}
+        self.events: dict[str, List[str]] = {}
+        self.sources: dict[str, List[Tuple[str, str]]] = {}
 
-    def __iter__(self) -> Iterator[tuple[str, list[str], tuple[str, str]]]:
+    def __iter__(self) -> Any:
         for name, args in self.events.items():
             for source in self.sources[name]:
                 yield name, args, source
 
     def add_event(
-        self, name, args: list[str], source: tuple[str, str]
+        self, name, args: List[str], source: Tuple[str, str]
     ) -> None:
         if name in self.events:
             self._check_args_match(name, args)
@@ -49,7 +45,7 @@ class AuditEvents:
             self.events[name] = args
         self.sources.setdefault(name, []).append(source)
 
-    def _check_args_match(self, name: str, args: list[str]) -> None:
+    def _check_args_match(self, name: str, args: List[str]) -> None:
         current_args = self.events[name]
         msg = (
             f"Mismatched arguments for audit-event {name}: "
@@ -60,7 +56,7 @@ class AuditEvents:
         if len(current_args) != len(args):
             logger.warning(msg)
             return
-        for a1, a2 in zip(current_args, args, strict=False):
+        for a1, a2 in zip(current_args, args):
             if a1 == a2:
                 continue
             if any(a1 in s and a2 in s for s in _SYNONYMS):
@@ -73,7 +69,7 @@ class AuditEvents:
         name_clean = re.sub(r"\W", "_", name)
         return f"audit_event_{name_clean}_{source_count}"
 
-    def rows(self) -> Iterator[tuple[str, list[str], list[tuple[str, str]]]]:
+    def rows(self) -> Any:
         for name in sorted(self.events.keys()):
             yield name, self.events[name], self.sources[name]
 
@@ -97,7 +93,7 @@ def audit_events_purge(
 def audit_events_merge(
     app: Sphinx,
     env: BuildEnvironment,
-    docnames: list[str],
+    docnames: List[str],
     other: BuildEnvironment,
 ) -> None:
     """In Sphinx parallel builds, this merges audit_events from 
subprocesses."""
@@ -126,14 +122,16 @@ class AuditEvent(SphinxDirective):
         ),
     ]
 
-    def run(self) -> list[nodes.paragraph]:
+    def run(self) -> List[nodes.paragraph]:
+        def _no_walrus_op(args):
+            for arg in args.strip("'\"").split(","):
+                aarg = arg.strip()
+                if aarg:
+                    yield aarg
+
         name = self.arguments[0]
         if len(self.arguments) >= 2 and self.arguments[1]:
-            args = [
-                arg
-                for argument in self.arguments[1].strip("'\"").split(",")
-                if (arg := argument.strip())
-            ]
+            args = list(_no_walrus_op(self.arguments[1]))
         else:
             args = []
         ids = []
@@ -169,7 +167,7 @@ class audit_event_list(nodes.General, no
 
 
 class AuditEventListDirective(SphinxDirective):
-    def run(self) -> list[audit_event_list]:
+    def run(self) -> List[audit_event_list]:
         return [audit_event_list()]
 
 
@@ -181,7 +179,11 @@ class AuditEventListTransform(SphinxPost
             return
 
         table = self._make_table(self.app.builder, self.env.docname)
-        for node in self.document.findall(audit_event_list):
+        try:
+            findall = self.document.findall
+        except AttributeError:
+            findall = self.document.traverse
+        for node in findall(audit_event_list):
             node.replace_self(table)
 
     def _make_table(self, builder: Builder, docname: str) -> nodes.table:
@@ -217,8 +219,8 @@ class AuditEventListTransform(SphinxPost
         builder: Builder,
         docname: str,
         name: str,
-        args: list[str],
-        sources: list[tuple[str, str]],
+        args: List[str],
+        sources: List[Tuple[str, str]],
     ) -> nodes.row:
         row = nodes.row()
         name_node = nodes.paragraph("", nodes.Text(name))
--- a/Doc/tools/extensions/c_annotations.py
+++ b/Doc/tools/extensions/c_annotations.py
@@ -9,12 +9,10 @@ Configuration:
 * Set ``stable_abi_file`` to the path to stable ABI list.
 """
 
-from __future__ import annotations
-
 import csv
 import dataclasses
 from pathlib import Path
-from typing import TYPE_CHECKING
+from typing import Any, Dict, List, TYPE_CHECKING, Union
 
 import sphinx
 from docutils import nodes
@@ -23,9 +21,7 @@ from sphinx import addnodes
 from sphinx.locale import _ as sphinx_gettext
 from sphinx.util.docutils import SphinxDirective
 
-if TYPE_CHECKING:
-    from sphinx.application import Sphinx
-    from sphinx.util.typing import ExtensionMetadata
+from sphinx.application import Sphinx
 
 ROLE_TO_OBJECT_TYPE = {
     "func": "function",
@@ -36,20 +32,20 @@ ROLE_TO_OBJECT_TYPE = {
 }
 
 
[email protected](slots=True)
[email protected]()
 class RefCountEntry:
     # Name of the function.
     name: str
     # List of (argument name, type, refcount effect) tuples.
     # (Currently not used. If it was, a dataclass might work better.)
-    args: list = dataclasses.field(default_factory=list)
+    args: List = dataclasses.field(default_factory=list)
     # Return type of the function.
     result_type: str = ""
     # Reference count effect for the return value.
-    result_refs: int | None = None
+    result_refs: Union[int, None] = None
 
 
[email protected](frozen=True, slots=True)
[email protected](frozen=True)
 class StableABIEntry:
     # Role of the object.
     # Source: Each [item_kind] in stable_abi.toml is mapped to a C Domain role.
@@ -68,7 +64,7 @@ class StableABIEntry:
     struct_abi_kind: str
 
 
-def read_refcount_data(refcount_filename: Path) -> dict[str, RefCountEntry]:
+def read_refcount_data(refcount_filename: Path) -> Dict[str, RefCountEntry]:
     refcount_data = {}
     refcounts = refcount_filename.read_text(encoding="utf8")
     for line in refcounts.splitlines():
@@ -104,7 +100,7 @@ def read_refcount_data(refcount_filename
     return refcount_data
 
 
-def read_stable_abi_data(stable_abi_file: Path) -> dict[str, StableABIEntry]:
+def read_stable_abi_data(stable_abi_file: Path) -> Dict[str, StableABIEntry]:
     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
         objtype = par["objtype"]
 
         # Stable ABI annotation.
-        if record := stable_abi_data.get(name):
+        record = stable_abi_data.get(name)
+        if record:
             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.
     )
 
 
-def _return_value_annotation(result_refs: int | None) -> nodes.emphasis:
+def _return_value_annotation(result_refs: Union[int, None]) -> nodes.emphasis:
     classes = ["refcount"]
     if result_refs is None:
         rc = sphinx_gettext("Return value: Always NULL.")
@@ -262,7 +259,7 @@ class LimitedAPIList(SphinxDirective):
     optional_arguments = 0
     final_argument_whitespace = True
 
-    def run(self) -> list[nodes.Node]:
+    def run(self) -> List[nodes.Node]:
         state = self.env.domaindata["c_annotations"]
         content = [
             f"* :c:{record.role}:`{record.name}`"
@@ -285,7 +282,7 @@ def init_annotations(app: Sphinx) -> Non
     )
 
 
-def setup(app: Sphinx) -> ExtensionMetadata:
+def setup(app: Sphinx) -> Any:
     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
         from sphinx.domains.c import CObject
 
         # monkey-patch C object...
-        CObject.option_spec |= {
+        CObject.option_spec.update({
             "no-index-entry": directives.flag,
             "no-contents-entry": directives.flag,
-        }
+        })
 
     return {
         "version": "1.0",
--- a/Doc/tools/extensions/glossary_search.py
+++ b/Doc/tools/extensions/glossary_search.py
@@ -1,18 +1,14 @@
 """Feature search results for glossary items prominently."""
 
-from __future__ import annotations
-
 import json
 from pathlib import Path
-from typing import TYPE_CHECKING
+from typing import Any, TYPE_CHECKING
 
 from docutils import nodes
 from sphinx.addnodes import glossary
 from sphinx.util import logging
 
-if TYPE_CHECKING:
-    from sphinx.application import Sphinx
-    from sphinx.util.typing import ExtensionMetadata
+from sphinx.application import Sphinx
 
 logger = logging.getLogger(__name__)
 
@@ -60,7 +56,7 @@ def write_glossary_json(app: Sphinx, _ex
     dest.write_text(json.dumps(app.env.glossary_terms), encoding='utf-8')
 
 
-def setup(app: Sphinx) -> ExtensionMetadata:
+def setup(app: Sphinx) -> Any:
     app.connect('doctree-resolved', process_glossary_nodes)
     app.connect('build-finished', write_glossary_json)
 
--- a/Doc/tools/extensions/patchlevel.py
+++ b/Doc/tools/extensions/patchlevel.py
@@ -3,7 +3,7 @@
 import re
 import sys
 from pathlib import Path
-from typing import Literal, NamedTuple
+from typing import NamedTuple, Tuple
 
 CPYTHON_ROOT = Path(
     __file__,  # cpython/Doc/tools/extensions/patchlevel.py
@@ -26,7 +26,7 @@ class version_info(NamedTuple):  # noqa:
     major: int  #: Major release number
     minor: int  #: Minor release number
     micro: int  #: Patch release number
-    releaselevel: Literal["alpha", "beta", "candidate", "final"]
+    releaselevel: str
     serial: int  #: Serial release number
 
 
@@ -37,7 +37,8 @@ def get_header_version_info() -> version
     defines = {}
     patchlevel_h = PATCHLEVEL_H.read_text(encoding="utf-8")
     for line in patchlevel_h.splitlines():
-        if (m := pat.match(line)) is not None:
+        m = pat.match(line)
+        if m is not None:
             name, value = m.groups()
             defines[name] = value
 
@@ -50,7 +51,7 @@ def get_header_version_info() -> version
     )
 
 
-def format_version_info(info: version_info) -> tuple[str, str]:
+def format_version_info(info: version_info) -> Tuple[str, str]:
     version = f"{info.major}.{info.minor}"
     release = f"{info.major}.{info.minor}.{info.micro}"
     if info.releaselevel != "final":

++++++ fix-test-recursion-limit-15.6.patch ++++++
--- /var/tmp/diff_new_pack.DSiTUj/_old  2024-09-26 18:52:59.752359116 +0200
+++ /var/tmp/diff_new_pack.DSiTUj/_new  2024-09-26 18:52:59.752359116 +0200
@@ -1,7 +1,9 @@
-Index: Python-3.12.3/Lib/test/test_compile.py
-===================================================================
---- Python-3.12.3.orig/Lib/test/test_compile.py
-+++ Python-3.12.3/Lib/test/test_compile.py
+---
+ Lib/test/test_compile.py |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/Lib/test/test_compile.py
++++ b/Lib/test/test_compile.py
 @@ -14,6 +14,9 @@ from test.support import (script_helper,
                            requires_specialization, C_RECURSION_LIMIT)
  from test.support.os_helper import FakePath

++++++ fix_configure_rst.patch ++++++
--- /var/tmp/diff_new_pack.DSiTUj/_old  2024-09-26 18:52:59.768359779 +0200
+++ /var/tmp/diff_new_pack.DSiTUj/_new  2024-09-26 18:52:59.772359945 +0200
@@ -21,7 +21,7 @@
     Create a Python.framework rather than a traditional Unix install. Optional
 --- a/Misc/NEWS
 +++ b/Misc/NEWS
-@@ -13832,7 +13832,7 @@ C API
+@@ -13974,7 +13974,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

Reply via email to