- Update to 3.13.4:

- Security
    - gh-135034: Fixes multiple issues that allowed tarfile
      extraction filters (filter="data" and filter="tar") to be
      bypassed using crafted symlinks and hard links.
      Addresses CVE-2024-12718 (bsc#1244056), CVE-2025-4138
      (bsc#1244059), CVE-2025-4330 (bsc#1244060), and
      CVE-2025-4517 (bsc#1244032).
    - gh-133767: Fix use-after-free in the “unicode-escape”
      decoder with a non-“strict” error handler (CVE-2025-4516,
      bsc#1243273).
    - gh-128840: Short-circuit the processing of long IPv6
      addresses early in ipaddress to prevent excessive memory
      consumption and a minor denial-of-service.
  - Library
    - gh-134718: ast.dump() now only omits None and [] values if
      they are default values.
    - gh-128840: Fix parsing long IPv6 addresses with embedded
      IPv4 address.
    - gh-134696: Built-in HACL* and OpenSSL implementations of
      hash function constructors now correctly accept the same
      documented named arguments. For instance, md5() could be
      previously invoked as md5(data=data) or md5(string=string)
      depending on the underlying implementation but these calls
      were not compatible. Patch by Bénédikt Tran.
    - gh-134210: curses.window.getch() now correctly handles
      signals. Patch by Bénédikt Tran.
    - gh-80334: multiprocessing.freeze_support() now checks for
      work on any “spawn” start method platform rather than only
      on Windows.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python313?expand=0&rev=100
This commit is contained in:
2025-06-09 21:38:15 +00:00
committed by Git OBS Bridge
parent 6d5d3f96b0
commit 6072bbdbcd
13 changed files with 356 additions and 703 deletions

View File

@@ -1,18 +1,16 @@
---
Doc/conf.py | 17 ++++++++--
Doc/conf.py | 17 ++++++++-
Doc/tools/check-warnings.py | 3 +
Doc/tools/extensions/audit_events.py | 54 ++++++++++++++++----------------
Doc/tools/extensions/audit_events.py | 55 ++++++++++++++++----------------
Doc/tools/extensions/availability.py | 15 ++++----
Doc/tools/extensions/c_annotations.py | 45 ++++++++++++++++----------
Doc/tools/extensions/c_annotations.py | 45 +++++++++++++++-----------
Doc/tools/extensions/glossary_search.py | 10 +----
Doc/tools/extensions/patchlevel.py | 9 ++---
7 files changed, 87 insertions(+), 66 deletions(-)
7 files changed, 87 insertions(+), 67 deletions(-)
Index: Python-3.13.3/Doc/conf.py
===================================================================
--- Python-3.13.3.orig/Doc/conf.py 2025-04-11 21:52:28.845065297 +0200
+++ Python-3.13.3/Doc/conf.py 2025-04-11 21:55:28.065280454 +0200
@@ -18,6 +18,9 @@
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -18,6 +18,9 @@ sys.path.append(os.path.abspath('include
# Python specific content from Doc/Tools/extensions/pyspecific.py
from pyspecific import SOURCE_URI
@@ -22,7 +20,7 @@ Index: Python-3.13.3/Doc/conf.py
# General configuration
# ---------------------
@@ -92,7 +95,7 @@
@@ -92,7 +95,7 @@ highlight_language = 'python3'
# Minimum version of sphinx required
# Keep this version in sync with ``Doc/requirements.txt``.
@@ -31,7 +29,7 @@ Index: Python-3.13.3/Doc/conf.py
# Create table of contents entries for domain objects (e.g. functions, classes,
# attributes, etc.). Default is True.
@@ -361,7 +364,7 @@
@@ -360,7 +363,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", "")
@@ -40,7 +38,7 @@ Index: Python-3.13.3/Doc/conf.py
html_context = {
"is_deployment_preview": is_deployment_preview,
"repository_url": repository_url or None,
@@ -606,6 +609,16 @@
@@ -605,6 +608,16 @@ extlinks = {
}
extlinks_detect_hardcoded_links = True
@@ -57,11 +55,9 @@ Index: Python-3.13.3/Doc/conf.py
# Options for c_annotations extension
# -----------------------------------
Index: Python-3.13.3/Doc/tools/check-warnings.py
===================================================================
--- Python-3.13.3.orig/Doc/tools/check-warnings.py 2025-04-08 15:54:08.000000000 +0200
+++ Python-3.13.3/Doc/tools/check-warnings.py 2025-04-11 21:55:11.212002463 +0200
@@ -228,7 +228,8 @@
--- 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:
@@ -71,11 +67,9 @@ Index: Python-3.13.3/Doc/tools/check-warnings.py
print(" {line}: {msg}".format_map(match))
return -1
return 0
Index: Python-3.13.3/Doc/tools/extensions/audit_events.py
===================================================================
--- Python-3.13.3.orig/Doc/tools/extensions/audit_events.py 2025-04-08 15:54:08.000000000 +0200
+++ Python-3.13.3/Doc/tools/extensions/audit_events.py 2025-04-11 21:55:11.212275615 +0200
@@ -1,9 +1,6 @@
--- a/Doc/tools/extensions/audit_events.py
+++ b/Doc/tools/extensions/audit_events.py
@@ -1,23 +1,18 @@
"""Support for documenting audit events."""
-from __future__ import annotations
@@ -84,15 +78,16 @@ Index: Python-3.13.3/Doc/tools/extensions/audit_events.py
-from typing import TYPE_CHECKING
from docutils import nodes
+from typing import Any, List, Tuple
from sphinx.errors import NoUri
@@ -12,12 +9,11 @@
from sphinx.locale import _ as sphinx_gettext
from sphinx.transforms.post_transforms import SphinxPostTransform
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 collections.abc import Iterator, Set
-
- from sphinx.application import Sphinx
- from sphinx.builders import Builder
- from sphinx.environment import BuildEnvironment
@@ -102,12 +97,12 @@ Index: Python-3.13.3/Doc/tools/extensions/audit_events.py
logger = logging.getLogger(__name__)
@@ -32,16 +28,16 @@
@@ -32,16 +27,16 @@ _SYNONYMS = [
class AuditEvents:
def __init__(self) -> None:
- self.events: dict[str, list[str]] = {}
- self.sources: dict[str, list[tuple[str, str]]] = {}
- self.sources: dict[str, set[tuple[str, str]]] = {}
+ self.events: dict[str, List[str]] = {}
+ self.sources: dict[str, List[Tuple[str, str]]] = {}
@@ -123,16 +118,16 @@ Index: Python-3.13.3/Doc/tools/extensions/audit_events.py
) -> None:
if name in self.events:
self._check_args_match(name, args)
@@ -49,7 +45,7 @@
@@ -49,7 +44,7 @@ class AuditEvents:
self.events[name] = args
self.sources.setdefault(name, []).append(source)
self.sources.setdefault(name, set()).add(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 @@
@@ -60,7 +55,7 @@ class AuditEvents:
if len(current_args) != len(args):
logger.warning(msg)
return
@@ -141,16 +136,16 @@ Index: Python-3.13.3/Doc/tools/extensions/audit_events.py
if a1 == a2:
continue
if any(a1 in s and a2 in s for s in _SYNONYMS):
@@ -73,7 +69,7 @@
@@ -73,7 +68,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) -> Iterator[tuple[str, list[str], Set[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 @@
@@ -97,7 +92,7 @@ def audit_events_purge(
def audit_events_merge(
app: Sphinx,
env: BuildEnvironment,
@@ -159,7 +154,7 @@ Index: Python-3.13.3/Doc/tools/extensions/audit_events.py
other: BuildEnvironment,
) -> None:
"""In Sphinx parallel builds, this merges audit_events from subprocesses."""
@@ -126,14 +122,16 @@
@@ -126,14 +121,16 @@ class AuditEvent(SphinxDirective):
),
]
@@ -182,7 +177,7 @@ Index: Python-3.13.3/Doc/tools/extensions/audit_events.py
else:
args = []
ids = []
@@ -169,7 +167,7 @@
@@ -169,7 +166,7 @@ class audit_event_list(nodes.General, no
class AuditEventListDirective(SphinxDirective):
@@ -191,7 +186,7 @@ Index: Python-3.13.3/Doc/tools/extensions/audit_events.py
return [audit_event_list()]
@@ -181,7 +179,11 @@
@@ -181,7 +178,11 @@ class AuditEventListTransform(SphinxPost
return
table = self._make_table(self.app.builder, self.env.docname)
@@ -204,21 +199,19 @@ Index: Python-3.13.3/Doc/tools/extensions/audit_events.py
node.replace_self(table)
def _make_table(self, builder: Builder, docname: str) -> nodes.table:
@@ -217,8 +219,8 @@
@@ -217,8 +218,8 @@ class AuditEventListTransform(SphinxPost
builder: Builder,
docname: str,
name: str,
- args: list[str],
- sources: list[tuple[str, str]],
- sources: Set[tuple[str, str]],
+ args: List[str],
+ sources: List[Tuple[str, str]],
+ sources: Set[Tuple[str, str]],
) -> nodes.row:
row = nodes.row()
name_node = nodes.paragraph("", nodes.Text(name))
Index: Python-3.13.3/Doc/tools/extensions/availability.py
===================================================================
--- Python-3.13.3.orig/Doc/tools/extensions/availability.py 2025-04-08 15:54:08.000000000 +0200
+++ Python-3.13.3/Doc/tools/extensions/availability.py 2025-04-11 21:55:11.212578519 +0200
--- a/Doc/tools/extensions/availability.py
+++ b/Doc/tools/extensions/availability.py
@@ -1,8 +1,6 @@
"""Support for documenting platform availability"""
@@ -229,7 +222,7 @@ Index: Python-3.13.3/Doc/tools/extensions/availability.py
from docutils import nodes
from sphinx import addnodes
@@ -55,7 +53,7 @@
@@ -55,7 +53,7 @@ class Availability(SphinxDirective):
optional_arguments = 0
final_argument_whitespace = True
@@ -238,7 +231,7 @@ Index: Python-3.13.3/Doc/tools/extensions/availability.py
title = sphinx_gettext("Availability")
refnode = addnodes.pending_xref(
title,
@@ -79,7 +77,7 @@
@@ -79,7 +77,7 @@ class Availability(SphinxDirective):
return [cnode]
@@ -247,7 +240,7 @@ Index: Python-3.13.3/Doc/tools/extensions/availability.py
"""Parse platform information from arguments
Arguments is a comma-separated string of platforms. A platform may
@@ -98,12 +96,13 @@
@@ -98,12 +96,13 @@ class Availability(SphinxDirective):
platform, _, version = arg.partition(" >= ")
if platform.startswith("not "):
version = False
@@ -263,7 +256,7 @@ Index: Python-3.13.3/Doc/tools/extensions/availability.py
logger.warning(
"Unknown platform%s or syntax '%s' in '.. availability:: %s', "
"see %s:KNOWN_PLATFORMS for a set of known platforms.",
@@ -116,7 +115,7 @@
@@ -116,7 +115,7 @@ class Availability(SphinxDirective):
return platforms
@@ -272,11 +265,9 @@ Index: Python-3.13.3/Doc/tools/extensions/availability.py
app.add_directive("availability", Availability)
return {
Index: Python-3.13.3/Doc/tools/extensions/c_annotations.py
===================================================================
--- Python-3.13.3.orig/Doc/tools/extensions/c_annotations.py 2025-04-08 15:54:08.000000000 +0200
+++ Python-3.13.3/Doc/tools/extensions/c_annotations.py 2025-04-11 21:55:11.212780990 +0200
@@ -9,22 +9,18 @@
--- a/Doc/tools/extensions/c_annotations.py
+++ b/Doc/tools/extensions/c_annotations.py
@@ -9,22 +9,18 @@ Configuration:
* Set ``stable_abi_file`` to the path to stable ABI list.
"""
@@ -302,7 +293,7 @@ Index: Python-3.13.3/Doc/tools/extensions/c_annotations.py
ROLE_TO_OBJECT_TYPE = {
"func": "function",
@@ -35,20 +31,20 @@
@@ -35,20 +31,20 @@ ROLE_TO_OBJECT_TYPE = {
}
@@ -327,7 +318,7 @@ Index: Python-3.13.3/Doc/tools/extensions/c_annotations.py
class StableABIEntry:
# Role of the object.
# Source: Each [item_kind] in stable_abi.toml is mapped to a C Domain role.
@@ -67,7 +63,7 @@
@@ -67,7 +63,7 @@ class StableABIEntry:
struct_abi_kind: str
@@ -336,7 +327,7 @@ Index: Python-3.13.3/Doc/tools/extensions/c_annotations.py
refcount_data = {}
refcounts = refcount_filename.read_text(encoding="utf8")
for line in refcounts.splitlines():
@@ -103,7 +99,7 @@
@@ -103,7 +99,7 @@ def read_refcount_data(refcount_filename
return refcount_data
@@ -345,7 +336,7 @@ Index: Python-3.13.3/Doc/tools/extensions/c_annotations.py
stable_abi_data = {}
with open(stable_abi_file, encoding="utf8") as fp:
for record in csv.DictReader(fp):
@@ -123,11 +119,14 @@
@@ -123,11 +119,14 @@ def add_annotations(app: Sphinx, doctree
continue
if not par[0].get("ids", None):
continue
@@ -362,7 +353,7 @@ Index: Python-3.13.3/Doc/tools/extensions/c_annotations.py
if ROLE_TO_OBJECT_TYPE[record.role] != objtype:
msg = (
f"Object type mismatch in limited API annotation for {name}: "
@@ -234,7 +233,7 @@
@@ -234,7 +233,7 @@ def _unstable_api_annotation() -> nodes.
)
@@ -371,7 +362,7 @@ Index: Python-3.13.3/Doc/tools/extensions/c_annotations.py
classes = ["refcount"]
if result_refs is None:
rc = sphinx_gettext("Return value: Always NULL.")
@@ -254,7 +253,7 @@
@@ -254,7 +253,7 @@ class LimitedAPIList(SphinxDirective):
optional_arguments = 0
final_argument_whitespace = True
@@ -380,7 +371,7 @@ Index: Python-3.13.3/Doc/tools/extensions/c_annotations.py
state = self.env.domaindata["c_annotations"]
content = [
f"* :c:{record.role}:`{record.name}`"
@@ -277,13 +276,23 @@
@@ -277,13 +276,23 @@ def init_annotations(app: Sphinx) -> Non
)
@@ -405,10 +396,8 @@ Index: Python-3.13.3/Doc/tools/extensions/c_annotations.py
return {
"version": "1.0",
"parallel_read_safe": True,
Index: Python-3.13.3/Doc/tools/extensions/glossary_search.py
===================================================================
--- Python-3.13.3.orig/Doc/tools/extensions/glossary_search.py 2025-04-08 15:54:08.000000000 +0200
+++ Python-3.13.3/Doc/tools/extensions/glossary_search.py 2025-04-11 21:55:11.212983043 +0200
--- 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."""
@@ -430,7 +419,7 @@ Index: Python-3.13.3/Doc/tools/extensions/glossary_search.py
logger = logging.getLogger(__name__)
@@ -52,7 +48,7 @@
@@ -52,7 +48,7 @@ def write_glossary_json(app: Sphinx, _ex
dest.write_text(json.dumps(app.env.glossary_terms), encoding='utf-8')
@@ -439,10 +428,8 @@ Index: Python-3.13.3/Doc/tools/extensions/glossary_search.py
app.connect('doctree-resolved', process_glossary_nodes)
app.connect('build-finished', write_glossary_json)
Index: Python-3.13.3/Doc/tools/extensions/patchlevel.py
===================================================================
--- Python-3.13.3.orig/Doc/tools/extensions/patchlevel.py 2025-04-08 15:54:08.000000000 +0200
+++ Python-3.13.3/Doc/tools/extensions/patchlevel.py 2025-04-11 21:55:11.213150035 +0200
--- a/Doc/tools/extensions/patchlevel.py
+++ b/Doc/tools/extensions/patchlevel.py
@@ -3,7 +3,7 @@
import re
import sys
@@ -452,7 +439,7 @@ Index: Python-3.13.3/Doc/tools/extensions/patchlevel.py
CPYTHON_ROOT = Path(
__file__, # cpython/Doc/tools/extensions/patchlevel.py
@@ -26,7 +26,7 @@
@@ -26,7 +26,7 @@ class version_info(NamedTuple): # noqa:
major: int #: Major release number
minor: int #: Minor release number
micro: int #: Patch release number
@@ -461,7 +448,7 @@ Index: Python-3.13.3/Doc/tools/extensions/patchlevel.py
serial: int #: Serial release number
@@ -37,7 +37,8 @@
@@ -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():
@@ -471,7 +458,7 @@ Index: Python-3.13.3/Doc/tools/extensions/patchlevel.py
name, value = m.groups()
defines[name] = value
@@ -50,7 +51,7 @@
@@ -50,7 +51,7 @@ def get_header_version_info() -> version
)