Sync from SUSE:SLFO:Main python313 revision 5d4062f27189f9d44beb46048ef6cfe5

This commit is contained in:
2025-04-25 01:03:29 +02:00
parent 1a9b96ab31
commit 82f875fb14
12 changed files with 611 additions and 108 deletions

View File

@@ -28,9 +28,11 @@ Co-authored-by: Lumír Balhar <frenzy.madness@gmail.com>
Lib/test/test_sysconfig.py | 17 +++++++++++--
2 files changed, 67 insertions(+), 7 deletions(-)
--- a/Lib/sysconfig/__init__.py
+++ b/Lib/sysconfig/__init__.py
@@ -106,6 +106,11 @@ if os.name == 'nt':
Index: Python-3.13.3/Lib/sysconfig/__init__.py
===================================================================
--- Python-3.13.3.orig/Lib/sysconfig/__init__.py 2025-04-08 15:54:08.000000000 +0200
+++ Python-3.13.3/Lib/sysconfig/__init__.py 2025-04-11 21:52:31.769387873 +0200
@@ -106,6 +106,11 @@
else:
_INSTALL_SCHEMES['venv'] = _INSTALL_SCHEMES['posix_venv']
@@ -42,7 +44,7 @@ Co-authored-by: Lumír Balhar <frenzy.madness@gmail.com>
def _get_implementation():
return 'Python'
@@ -167,13 +172,28 @@ if _HAS_USER_BASE:
@@ -167,13 +172,28 @@
},
}
@@ -71,7 +73,7 @@ Co-authored-by: Lumír Balhar <frenzy.madness@gmail.com>
_BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
# Mutex guarding initialization of _CONFIG_VARS.
_CONFIG_VARS_LOCK = threading.RLock()
@@ -259,11 +279,40 @@ def _extend_dict(target_dict, other_dict
@@ -266,11 +286,40 @@
target_dict[key] = value
@@ -113,7 +115,7 @@ Co-authored-by: Lumír Balhar <frenzy.madness@gmail.com>
if os.name == 'nt':
# On Windows we want to substitute 'lib' for schemes rather
# than the native value (without modifying vars, in case it
@@ -464,10 +513,8 @@ def _init_config_vars():
@@ -471,10 +520,8 @@
# Normalized versions of prefix and exec_prefix are handy to have;
# in fact, these are the standard versions used most places in the
# Distutils.
@@ -126,9 +128,11 @@ Co-authored-by: Lumír Balhar <frenzy.madness@gmail.com>
_CONFIG_VARS['py_version'] = _PY_VERSION
_CONFIG_VARS['py_version_short'] = _PY_VERSION_SHORT
_CONFIG_VARS['py_version_nodot'] = _PY_VERSION_SHORT_NO_DOT
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -130,8 +130,19 @@ class TestSysConfig(unittest.TestCase):
Index: Python-3.13.3/Lib/test/test_sysconfig.py
===================================================================
--- Python-3.13.3.orig/Lib/test/test_sysconfig.py 2025-04-08 15:54:08.000000000 +0200
+++ Python-3.13.3/Lib/test/test_sysconfig.py 2025-04-11 21:52:31.769841915 +0200
@@ -130,8 +130,19 @@
for scheme in _INSTALL_SCHEMES:
for name in _INSTALL_SCHEMES[scheme]:
expected = _INSTALL_SCHEMES[scheme][name].format(**config_vars)
@@ -149,7 +153,7 @@ Co-authored-by: Lumír Balhar <frenzy.madness@gmail.com>
os.path.normpath(expected),
)
@@ -386,7 +397,7 @@ class TestSysConfig(unittest.TestCase):
@@ -386,7 +397,7 @@
self.assertTrue(os.path.isfile(config_h), config_h)
def test_get_scheme_names(self):
@@ -158,7 +162,7 @@ Co-authored-by: Lumír Balhar <frenzy.madness@gmail.com>
if HAS_USER_BASE:
wanted.extend(['nt_user', 'osx_framework_user', 'posix_user'])
self.assertEqual(get_scheme_names(), tuple(sorted(wanted)))
@@ -398,6 +409,8 @@ class TestSysConfig(unittest.TestCase):
@@ -398,6 +409,8 @@
cmd = "-c", "import sysconfig; print(sysconfig.get_platform())"
self.assertEqual(py.call_real(*cmd), py.call_link(*cmd))

BIN
Python-3.13.2.tar.xz (Stored with Git LFS)

Binary file not shown.

File diff suppressed because one or more lines are too long

BIN
Python-3.13.3.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -5,28 +5,32 @@ Subject: [PATCH] bpo-31046: ensurepip does not honour the value of $(prefix)
Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
---
Doc/library/ensurepip.rst | 9 +++--
Doc/library/ensurepip.rst | 12 +++++-
Lib/ensurepip/__init__.py | 18 +++++++---
Lib/test/test_ensurepip.py | 11 ++++++
Makefile.pre.in | 4 +-
Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst | 1
5 files changed, 34 insertions(+), 9 deletions(-)
5 files changed, 37 insertions(+), 9 deletions(-)
create mode 100644 Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst
--- a/Doc/library/ensurepip.rst
+++ b/Doc/library/ensurepip.rst
@@ -59,8 +59,9 @@ is at least as recent as the one availab
Index: Python-3.13.3/Doc/library/ensurepip.rst
===================================================================
--- Python-3.13.3.orig/Doc/library/ensurepip.rst 2025-04-08 15:54:08.000000000 +0200
+++ Python-3.13.3/Doc/library/ensurepip.rst 2025-04-11 21:54:47.449458319 +0200
@@ -61,7 +61,11 @@
By default, ``pip`` is installed into the current virtual environment
(if one is active) or into the system site packages (if there is no
active virtual environment). The installation location can be controlled
-through two additional command line options:
+through some additional command line options:
+
+.. option:: --prefix <dir>
+
+ Installs ``pip`` using the given directory prefix.
+* ``--prefix <dir>``: Installs ``pip`` using the given directory prefix.
* :samp:`--root {dir}`: Installs ``pip`` relative to the given root directory
rather than the root of the currently active virtual environment (if any)
or the default root for the current Python installation.
@@ -92,7 +93,7 @@ Module API
.. option:: --root <dir>
@@ -102,7 +106,7 @@
Returns a string specifying the available version of pip that will be
installed when bootstrapping an environment.
@@ -35,7 +39,7 @@ Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
altinstall=False, default_pip=False, \
verbosity=0)
@@ -102,6 +103,8 @@ Module API
@@ -112,6 +116,8 @@
If *root* is ``None``, then installation uses the default install location
for the current environment.
@@ -44,7 +48,7 @@ Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
*upgrade* indicates whether or not to upgrade an existing installation
of an earlier version of ``pip`` to the available version.
@@ -122,6 +125,8 @@ Module API
@@ -132,6 +138,8 @@
*verbosity* controls the level of output to :data:`sys.stdout` from the
bootstrapping operation.
@@ -53,9 +57,11 @@ Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
.. audit-event:: ensurepip.bootstrap root ensurepip.bootstrap
.. note::
--- a/Lib/ensurepip/__init__.py
+++ b/Lib/ensurepip/__init__.py
@@ -106,27 +106,27 @@ def _disable_pip_configuration_settings(
Index: Python-3.13.3/Lib/ensurepip/__init__.py
===================================================================
--- Python-3.13.3.orig/Lib/ensurepip/__init__.py 2025-04-08 15:54:08.000000000 +0200
+++ Python-3.13.3/Lib/ensurepip/__init__.py 2025-04-11 21:53:49.548370352 +0200
@@ -106,27 +106,27 @@
os.environ['PIP_CONFIG_FILE'] = os.devnull
@@ -88,7 +94,7 @@ Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
Note that calling this function will alter both sys.path and os.environ.
"""
@@ -162,6 +162,8 @@ def _bootstrap(*, root=None, upgrade=Fal
@@ -162,6 +162,8 @@
args = ["install", "--no-cache-dir", "--no-index", "--find-links", tmpdir]
if root:
args += ["--root", root]
@@ -97,7 +103,7 @@ Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
if upgrade:
args += ["--upgrade"]
if user:
@@ -238,6 +240,11 @@ def _main(argv=None):
@@ -238,6 +240,11 @@
help="Install everything relative to this alternate root directory.",
)
parser.add_argument(
@@ -109,7 +115,7 @@ Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
"--altinstall",
action="store_true",
default=False,
@@ -256,6 +263,7 @@ def _main(argv=None):
@@ -256,6 +263,7 @@
return _bootstrap(
root=args.root,
@@ -117,9 +123,11 @@ Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
upgrade=args.upgrade,
user=args.user,
verbosity=args.verbosity,
--- a/Lib/test/test_ensurepip.py
+++ b/Lib/test/test_ensurepip.py
@@ -101,6 +101,17 @@ class TestBootstrap(EnsurepipMixin, unit
Index: Python-3.13.3/Lib/test/test_ensurepip.py
===================================================================
--- Python-3.13.3.orig/Lib/test/test_ensurepip.py 2025-04-08 15:54:08.000000000 +0200
+++ Python-3.13.3/Lib/test/test_ensurepip.py 2025-04-11 21:53:49.548691764 +0200
@@ -101,6 +101,17 @@
unittest.mock.ANY,
)
@@ -137,9 +145,11 @@ Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
def test_bootstrapping_with_user(self):
ensurepip.bootstrap(user=True)
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -2139,7 +2139,7 @@ install: @FRAMEWORKINSTALLFIRST@ @INSTAL
Index: Python-3.13.3/Makefile.pre.in
===================================================================
--- Python-3.13.3.orig/Makefile.pre.in 2025-04-11 21:52:35.635495820 +0200
+++ Python-3.13.3/Makefile.pre.in 2025-04-11 21:53:49.549094822 +0200
@@ -2139,7 +2139,7 @@
install|*) ensurepip="" ;; \
esac; \
$(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
@@ -148,7 +158,7 @@ Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
fi
.PHONY: altinstall
@@ -2150,7 +2150,7 @@ altinstall: commoninstall
@@ -2150,7 +2150,7 @@
install|*) ensurepip="--altinstall" ;; \
esac; \
$(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
@@ -157,7 +167,9 @@ Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
fi
.PHONY: commoninstall
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst
Index: Python-3.13.3/Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ Python-3.13.3/Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst 2025-04-11 21:53:49.549612071 +0200
@@ -0,0 +1 @@
+A directory prefix can now be specified when using :mod:`ensurepip`.

View File

@@ -8,9 +8,11 @@
Doc/tools/extensions/patchlevel.py | 9 ++---
7 files changed, 87 insertions(+), 66 deletions(-)
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -17,6 +17,9 @@ sys.path.append(os.path.abspath('include
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 @@
# Python specific content from Doc/Tools/extensions/pyspecific.py
from pyspecific import SOURCE_URI
@@ -20,16 +22,16 @@
# General configuration
# ---------------------
@@ -90,7 +93,7 @@ highlight_language = 'python3'
@@ -92,7 +95,7 @@
# Minimum version of sphinx required
# Keep this version in sync with ``Doc/requirements.txt``.
-needs_sphinx = '8.1.3'
-needs_sphinx = '8.2.0'
+needs_sphinx = '4.2.0'
# Create table of contents entries for domain objects (e.g. functions, classes,
# attributes, etc.). Default is True.
@@ -359,7 +362,7 @@ html_short_title = f'{release} Documenta
@@ -361,7 +364,7 @@
# (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", "")
@@ -38,7 +40,7 @@
html_context = {
"is_deployment_preview": is_deployment_preview,
"repository_url": repository_url or None,
@@ -604,6 +607,16 @@ extlinks = {
@@ -606,6 +609,16 @@
}
extlinks_detect_hardcoded_links = True
@@ -55,9 +57,11 @@
# Options for c_annotations extension
# -----------------------------------
--- a/Doc/tools/check-warnings.py
+++ b/Doc/tools/check-warnings.py
@@ -228,7 +228,8 @@ def fail_if_regression(
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 @@
print(filename)
for warning in warnings:
if filename in warning:
@@ -67,8 +71,10 @@
print(" {line}: {msg}".format_map(match))
return -1
return 0
--- a/Doc/tools/extensions/audit_events.py
+++ b/Doc/tools/extensions/audit_events.py
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 @@
"""Support for documenting audit events."""
@@ -79,7 +85,7 @@
from docutils import nodes
from sphinx.errors import NoUri
@@ -12,12 +9,11 @@ from sphinx.transforms.post_transforms i
@@ -12,12 +9,11 @@
from sphinx.util import logging
from sphinx.util.docutils import SphinxDirective
@@ -96,7 +102,7 @@
logger = logging.getLogger(__name__)
@@ -32,16 +28,16 @@ _SYNONYMS = [
@@ -32,16 +28,16 @@
class AuditEvents:
def __init__(self) -> None:
@@ -117,7 +123,7 @@
) -> None:
if name in self.events:
self._check_args_match(name, args)
@@ -49,7 +45,7 @@ class AuditEvents:
@@ -49,7 +45,7 @@
self.events[name] = args
self.sources.setdefault(name, []).append(source)
@@ -126,7 +132,7 @@
current_args = self.events[name]
msg = (
f"Mismatched arguments for audit-event {name}: "
@@ -60,7 +56,7 @@ class AuditEvents:
@@ -60,7 +56,7 @@
if len(current_args) != len(args):
logger.warning(msg)
return
@@ -135,7 +141,7 @@
if a1 == a2:
continue
if any(a1 in s and a2 in s for s in _SYNONYMS):
@@ -73,7 +69,7 @@ class AuditEvents:
@@ -73,7 +69,7 @@
name_clean = re.sub(r"\W", "_", name)
return f"audit_event_{name_clean}_{source_count}"
@@ -144,7 +150,7 @@
for name in sorted(self.events.keys()):
yield name, self.events[name], self.sources[name]
@@ -97,7 +93,7 @@ def audit_events_purge(
@@ -97,7 +93,7 @@
def audit_events_merge(
app: Sphinx,
env: BuildEnvironment,
@@ -153,7 +159,7 @@
other: BuildEnvironment,
) -> None:
"""In Sphinx parallel builds, this merges audit_events from subprocesses."""
@@ -126,14 +122,16 @@ class AuditEvent(SphinxDirective):
@@ -126,14 +122,16 @@
),
]
@@ -176,7 +182,7 @@
else:
args = []
ids = []
@@ -169,7 +167,7 @@ class audit_event_list(nodes.General, no
@@ -169,7 +167,7 @@
class AuditEventListDirective(SphinxDirective):
@@ -185,7 +191,7 @@
return [audit_event_list()]
@@ -181,7 +179,11 @@ class AuditEventListTransform(SphinxPost
@@ -181,7 +179,11 @@
return
table = self._make_table(self.app.builder, self.env.docname)
@@ -198,7 +204,7 @@
node.replace_self(table)
def _make_table(self, builder: Builder, docname: str) -> nodes.table:
@@ -217,8 +219,8 @@ class AuditEventListTransform(SphinxPost
@@ -217,8 +219,8 @@
builder: Builder,
docname: str,
name: str,
@@ -209,8 +215,10 @@
) -> nodes.row:
row = nodes.row()
name_node = nodes.paragraph("", nodes.Text(name))
--- a/Doc/tools/extensions/availability.py
+++ b/Doc/tools/extensions/availability.py
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
@@ -1,8 +1,6 @@
"""Support for documenting platform availability"""
@@ -221,7 +229,7 @@
from docutils import nodes
from sphinx import addnodes
@@ -55,7 +53,7 @@ class Availability(SphinxDirective):
@@ -55,7 +53,7 @@
optional_arguments = 0
final_argument_whitespace = True
@@ -230,7 +238,7 @@
title = sphinx_gettext("Availability")
refnode = addnodes.pending_xref(
title,
@@ -79,7 +77,7 @@ class Availability(SphinxDirective):
@@ -79,7 +77,7 @@
return [cnode]
@@ -239,7 +247,7 @@
"""Parse platform information from arguments
Arguments is a comma-separated string of platforms. A platform may
@@ -98,12 +96,13 @@ class Availability(SphinxDirective):
@@ -98,12 +96,13 @@
platform, _, version = arg.partition(" >= ")
if platform.startswith("not "):
version = False
@@ -255,7 +263,7 @@
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 @@ class Availability(SphinxDirective):
@@ -116,7 +115,7 @@
return platforms
@@ -264,9 +272,11 @@
app.add_directive("availability", Availability)
return {
--- a/Doc/tools/extensions/c_annotations.py
+++ b/Doc/tools/extensions/c_annotations.py
@@ -9,22 +9,18 @@ Configuration:
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 @@
* Set ``stable_abi_file`` to the path to stable ABI list.
"""
@@ -292,7 +302,7 @@
ROLE_TO_OBJECT_TYPE = {
"func": "function",
@@ -35,20 +31,20 @@ ROLE_TO_OBJECT_TYPE = {
@@ -35,20 +31,20 @@
}
@@ -317,7 +327,7 @@
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 @@ class StableABIEntry:
@@ -67,7 +63,7 @@
struct_abi_kind: str
@@ -326,7 +336,7 @@
refcount_data = {}
refcounts = refcount_filename.read_text(encoding="utf8")
for line in refcounts.splitlines():
@@ -103,7 +99,7 @@ def read_refcount_data(refcount_filename
@@ -103,7 +99,7 @@
return refcount_data
@@ -335,7 +345,7 @@
stable_abi_data = {}
with open(stable_abi_file, encoding="utf8") as fp:
for record in csv.DictReader(fp):
@@ -123,11 +119,14 @@ def add_annotations(app: Sphinx, doctree
@@ -123,11 +119,14 @@
continue
if not par[0].get("ids", None):
continue
@@ -352,7 +362,7 @@
if ROLE_TO_OBJECT_TYPE[record.role] != objtype:
msg = (
f"Object type mismatch in limited API annotation for {name}: "
@@ -234,7 +233,7 @@ def _unstable_api_annotation() -> nodes.
@@ -234,7 +233,7 @@
)
@@ -361,7 +371,7 @@
classes = ["refcount"]
if result_refs is None:
rc = sphinx_gettext("Return value: Always NULL.")
@@ -254,7 +253,7 @@ class LimitedAPIList(SphinxDirective):
@@ -254,7 +253,7 @@
optional_arguments = 0
final_argument_whitespace = True
@@ -370,7 +380,7 @@
state = self.env.domaindata["c_annotations"]
content = [
f"* :c:{record.role}:`{record.name}`"
@@ -277,13 +276,23 @@ def init_annotations(app: Sphinx) -> Non
@@ -277,13 +276,23 @@
)
@@ -395,8 +405,10 @@
return {
"version": "1.0",
"parallel_read_safe": True,
--- a/Doc/tools/extensions/glossary_search.py
+++ b/Doc/tools/extensions/glossary_search.py
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
@@ -1,18 +1,14 @@
"""Feature search results for glossary items prominently."""
@@ -418,7 +430,7 @@
logger = logging.getLogger(__name__)
@@ -52,7 +48,7 @@ def write_glossary_json(app: Sphinx, _ex
@@ -52,7 +48,7 @@
dest.write_text(json.dumps(app.env.glossary_terms), encoding='utf-8')
@@ -427,8 +439,10 @@
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
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
@@ -3,7 +3,7 @@
import re
import sys
@@ -438,7 +452,7 @@
CPYTHON_ROOT = Path(
__file__, # cpython/Doc/tools/extensions/patchlevel.py
@@ -26,7 +26,7 @@ class version_info(NamedTuple): # noqa:
@@ -26,7 +26,7 @@
major: int #: Major release number
minor: int #: Minor release number
micro: int #: Patch release number
@@ -447,7 +461,7 @@
serial: int #: Serial release number
@@ -37,7 +37,8 @@ def get_header_version_info() -> version
@@ -37,7 +37,8 @@
defines = {}
patchlevel_h = PATCHLEVEL_H.read_text(encoding="utf-8")
for line in patchlevel_h.splitlines():
@@ -457,7 +471,7 @@
name, value = m.groups()
defines[name] = value
@@ -50,7 +51,7 @@ def get_header_version_info() -> version
@@ -50,7 +51,7 @@
)

View File

@@ -0,0 +1,94 @@
From 0e461dd411e9ec3dbdf376435154ca2834bcab51 Mon Sep 17 00:00:00 2001
From: Serhiy Storchaka <storchaka@gmail.com>
Date: Wed, 16 Apr 2025 00:24:56 +0300
Subject: [PATCH] gh-132535: Fix resource warnings in test_timeout
They were emitted if internet connection was not available.
---
Lib/test/test_timeout.py | 43 ++++++++++++++++---------------------------
1 file changed, 16 insertions(+), 27 deletions(-)
Index: Python-3.13.3/Lib/test/test_timeout.py
===================================================================
--- Python-3.13.3.orig/Lib/test/test_timeout.py 2025-04-08 15:54:08.000000000 +0200
+++ Python-3.13.3/Lib/test/test_timeout.py 2025-04-15 23:45:55.028517897 +0200
@@ -26,10 +26,8 @@
"""Test case for socket.gettimeout() and socket.settimeout()"""
def setUp(self):
- self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-
- def tearDown(self):
- self.sock.close()
+ self.sock = self.enterContext(
+ socket.socket(socket.AF_INET, socket.SOCK_STREAM))
def testObjectCreation(self):
# Test Socket creation
@@ -113,8 +111,6 @@
def setUp(self):
raise NotImplementedError()
- tearDown = setUp
-
def _sock_operation(self, count, timeout, method, *args):
"""
Test the specified socket method.
@@ -142,12 +138,10 @@
"""TCP test case for socket.socket() timeout functions"""
def setUp(self):
- self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ self.sock = self.enterContext(
+ socket.socket(socket.AF_INET, socket.SOCK_STREAM))
self.addr_remote = resolve_address('www.python.org.', 80)
- def tearDown(self):
- self.sock.close()
-
def testConnectTimeout(self):
# Testing connect timeout is tricky: we need to have IP connectivity
# to a host that silently drops our packets. We can't simulate this
@@ -190,19 +184,16 @@
# for the current configuration.
skip = True
- sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- timeout = support.LOOPBACK_TIMEOUT
- sock.settimeout(timeout)
- try:
- sock.connect((whitehole))
- except TimeoutError:
- pass
- except OSError as err:
- if err.errno == errno.ECONNREFUSED:
- skip = False
- finally:
- sock.close()
- del sock
+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
+ try:
+ timeout = support.LOOPBACK_TIMEOUT
+ sock.settimeout(timeout)
+ sock.connect((whitehole))
+ except TimeoutError:
+ pass
+ except OSError as err:
+ if err.errno == errno.ECONNREFUSED:
+ skip = False
if skip:
self.skipTest(
@@ -269,10 +260,8 @@
"""UDP test case for socket.socket() timeout functions"""
def setUp(self):
- self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-
- def tearDown(self):
- self.sock.close()
+ self.sock = self.enterContext(
+ socket.socket(socket.AF_INET, socket.SOCK_DGRAM))
def testRecvfromTimeout(self):
# Test recvfrom() timeout

View File

@@ -0,0 +1,95 @@
commit 2b0e2b2893a821ca36cd65a204bed932741ac189
Author: Filipe Laíns 🇵🇸 <lains@riseup.net>
Date: Tue Nov 26 13:46:33 2024 +0000
GH-126985: move pyvenv.cfg detection from site to getpath (#126987)
---
Lib/test/test_sysconfig.py | 67 ---------------------------------------------
1 file changed, 1 insertion(+), 66 deletions(-)
Index: Python-3.13.3/Lib/test/test_sysconfig.py
===================================================================
--- Python-3.13.3.orig/Lib/test/test_sysconfig.py 2025-04-15 14:13:08.581364697 +0200
+++ Python-3.13.3/Lib/test/test_sysconfig.py 2025-04-15 14:13:54.955529034 +0200
@@ -110,6 +110,7 @@
**venv_create_args,
)
+
def test_get_path_names(self):
self.assertEqual(get_path_names(), sysconfig._SCHEME_KEYS)
@@ -604,72 +605,6 @@
suffix = sysconfig.get_config_var('EXT_SUFFIX')
self.assertTrue(suffix.endswith('-darwin.so'), suffix)
- @requires_subprocess()
- def test_config_vars_depend_on_site_initialization(self):
- script = textwrap.dedent("""
- import sysconfig
-
- config_vars = sysconfig.get_config_vars()
-
- import json
- print(json.dumps(config_vars, indent=2))
- """)
-
- with self.venv() as venv:
- site_config_vars = json.loads(venv.run('-c', script).stdout)
- no_site_config_vars = json.loads(venv.run('-S', '-c', script).stdout)
-
- self.assertNotEqual(site_config_vars, no_site_config_vars)
- # With the site initialization, the virtual environment should be enabled.
- self.assertEqual(site_config_vars['base'], venv.prefix)
- self.assertEqual(site_config_vars['platbase'], venv.prefix)
- #self.assertEqual(site_config_vars['prefix'], venv.prefix) # # FIXME: prefix gets overwriten by _init_posix
- # Without the site initialization, the virtual environment should be disabled.
- self.assertEqual(no_site_config_vars['base'], site_config_vars['installed_base'])
- self.assertEqual(no_site_config_vars['platbase'], site_config_vars['installed_platbase'])
-
- @requires_subprocess()
- def test_config_vars_recalculation_after_site_initialization(self):
- script = textwrap.dedent("""
- import sysconfig
-
- before = sysconfig.get_config_vars()
-
- import site
- site.main()
-
- after = sysconfig.get_config_vars()
-
- import json
- print(json.dumps({'before': before, 'after': after}, indent=2))
- """)
-
- with self.venv() as venv:
- config_vars = json.loads(venv.run('-S', '-c', script).stdout)
-
- self.assertNotEqual(config_vars['before'], config_vars['after'])
- self.assertEqual(config_vars['after']['base'], venv.prefix)
- #self.assertEqual(config_vars['after']['prefix'], venv.prefix) # FIXME: prefix gets overwriten by _init_posix
- #self.assertEqual(config_vars['after']['exec_prefix'], venv.prefix) # FIXME: exec_prefix gets overwriten by _init_posix
-
- @requires_subprocess()
- def test_paths_depend_on_site_initialization(self):
- script = textwrap.dedent("""
- import sysconfig
-
- paths = sysconfig.get_paths()
-
- import json
- print(json.dumps(paths, indent=2))
- """)
-
- with self.venv() as venv:
- site_paths = json.loads(venv.run('-c', script).stdout)
- no_site_paths = json.loads(venv.run('-S', '-c', script).stdout)
-
- self.assertNotEqual(site_paths, no_site_paths)
-
-
class MakefileTests(unittest.TestCase):
@unittest.skipIf(sys.platform.startswith('win'),

View File

@@ -1,3 +1,282 @@
-------------------------------------------------------------------
Fri Apr 11 19:47:34 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Update to 3.13.3:
- Tools/Demos
- gh-131852: msgfmt no longer adds the POT-Creation-Date to
generated .mo files for consistency with GNU msgfmt.
- gh-85012: Correctly reset msgctxt when compiling messages
in msgfmt.
- gh-130025: The iOS testbed now correctly handles symlinks
used as Python framework references.
- Tests
- gh-131050: test_ssl.test_dh_params is skipped if the
underlying TLS library does not support finite-field
ephemeral Diffie-Hellman.
- gh-129200: Multiple iOS testbed runners can now be started
at the same time without introducing an ambiguity over
simulator ownership.
- gh-130292: The iOS testbed will now run successfully on a
machine that has not previously run Xcode tests (such as CI
configurations).
- gh-130293: The tests of terminal colorization are no longer
sensitive to the value of the TERM variable in the testing
environment.
- gh-126332: Add unit tests for pyrepl.
- Security
- gh-131809: Update bundled libexpat to 2.7.1
- gh-131261: Upgrade to libexpat 2.7.0
- gh-127371: Avoid unbounded buffering for
tempfile.SpooledTemporaryFile.writelines(). Previously,
disk spillover was only checked after the lines iterator
had been exhausted. This is now done after each line is
written.
- gh-121284: Fix bug in the folding of rfc2047 encoded-words
when flattening an email message using a modern email
policy. Previously when an encoded-word was too long for
a line, it would be decoded, split across lines, and
re-encoded. But commas and other special characters in the
original text could be left unencoded and unquoted. This
could theoretically be used to spoof header lines using
a carefully constructed encoded-word if the resulting
rendered email was transmitted or re-parsed.
- Library
- gh-132174: Fix function name in error message of
_interpreters.run_string.
- gh-132171: Fix crash of _interpreters.run_string on string
subclasses.
- gh-129204: Introduce new _PYTHON_SUBPROCESS_USE_POSIX_SPAWN
environment variable knob in subprocess to control the use
of os.posix_spawn().
- gh-132159: Do not shadow user arguments in generated
__new__() by decorator warnings.deprecated. Patch by Xuehai
Pan.
- gh-132075: Fix possible use of socket address structures
with uninitialized members. Now all structure members are
initialized with zeroes by default.
- gh-132002: Fix crash when deallocating
contextvars.ContextVar with weird unahashable string names.
- gh-131668: socket: Fix code parsing AF_BLUETOOTH socket
addresses.
- gh-131492: Fix a resource leak when constructing a
gzip.GzipFile with a filename fails, for example when
passing an invalid compresslevel.
- gh-131325: Fix sendfile fallback implementation to drain
data after writing to transport in asyncio.
- gh-129843: Fix incorrect argument passing in
warnings.warn_explicit().
- gh-131204: Use monospace font from System Font Stack for
cross-platform support in difflib.HtmlDiff.
- gh-130940: The PyConfig.use_system_logger attribute,
introduced in Python 3.13.2, has been removed. The
introduction of this attribute inadvertently introduced an
ABI breakage on macOS and iOS. The use of the system logger
is now enabled by default on iOS, and disabled by default
on macOS.
- gh-131045: Fix issue with __contains__, values, and
pseudo-members for enum.Flag.
- gh-130959: Fix pure-Python implementation of
datetime.time.fromisoformat() to reject times with spaces
in fractional part (for example, 12:34:56.400 +02:00),
matching the C implementation. Patch by Michał Gorny.
- gh-130637: Add validation for numeric response data in
poplib.POP3.stat() method
- gh-130461: Remove .. index:: directives from the uuid
module documentation. These directives previously created
entries in the general index for getnode() as well as
the uuid1(), uuid3(), uuid4(), and uuid5() constructor
functions.
- gh-130379: The zipapp module now calculates the list of
files to be added to the archive before creating the
archive. This avoids accidentally including the target when
it is being created in the source directory.
- gh-130285: Fix corner case for random.sample() allowing the
counts parameter to specify an empty population. So now,
sample([], 0, counts=[]) and sample('abc', k=0, counts=[0,
0, 0]) both give the same result as sample([], 0).
- gh-130250: Fix regression in traceback.print_last().
- gh-130230: Fix crash in pow() with only Decimal third
argument.
- gh-118761: Reverts a change in the previous release
attempting to make some stdlib imports used within the
subprocess module lazy as this was causing errors during
__del__ finalizers calling methods such as terminate, or
kill, or send_signal.
- gh-130164: Fixed failure to raise TypeError in
inspect.Signature.bind() for positional-only arguments
provided by keyword when a variadic keyword argument (e.g.
--kwargs) is present.
- gh-130151: Fix reference leaks in _hashlib.hmac_new() and
_hashlib.hmac_digest(). Patch by Bénédikt Tran.
- gh-130145: Fix asyncio.AbstractEventloop.run_forever() when
another loop is already running.
- gh-129726: Fix gzip.GzipFile raising an unraisable
exception during garbage collection when referring to
a temporary object by breaking the reference loop with
weakref.
- gh-127750: Remove broken functools.singledispatchmethod()
caching introduced in gh-85160.
- gh-129583: Update bundled pip to 25.0.1
- gh-97850: Update the deprecation warning of
importlib.abc.Loader.load_module().
- gh-129646: Update the locale alias mapping in the locale
module to match the latest X Org locale alias mapping and
support new locales in Glibc 2.41.
- gh-129603: Fix bugs where sqlite3.Row objects could
segfault if their inherited description was set to
None. Patch by Erlend Aasland.
- gh-128231: Execution of multiple statements in the new
REPL now stops immediately upon the first exception
encountered. Patch by Bartosz Sławecki.
- gh-117779: Fix reading duplicated entries in zipfile by
name. Reading duplicated entries (except the last one)
by ZipInfo now emits a warning instead of raising an
exception.
- gh-128772: Fix pydoc for methods with the __module__
attribute equal to None.
- gh-92897: Scheduled the deprecation of the check_home
argument of sysconfig.is_python_build() to Python 3.15.
- gh-128657: Fix possible extra reference when using objects
returned by hashlib.sha256() under free threading.
- gh-128703: Fix mimetypes.guess_type() to use default
mapping for empty Content-Type in registry.
- gh-128308: Support the name keyword argument
for eager tasks in asyncio.loop.create_task(),
asyncio.create_task() and asyncio.TaskGroup.create_task(),
by passing on all kwargs to the task factory set by
asyncio.loop.set_task_factory().
- gh-128388: Fix PyREPL on Windows to support more
keybindings, like the Control-← and Control-→ word-skipping
keybindings and those with meta (i.e. Alt), e.g. Alt-d to
kill-word or Alt-Backspace backward-kill-word.
- gh-126037: xml.etree.ElementTree: Fix a crash in
Element.find, Element.findtext and Element.findall when
the tag to find implements an __eq__() method mutating the
element being queried. Patch by Bénédikt Tran.
- gh-127712: Fix handling of the secure argument of
logging.handlers.SMTPHandler.
- gh-126033: xml.etree.ElementTree: Fix a crash in
Element.remove when the element is concurrently
mutated. Patch by Bénédikt Tran.
- gh-118201: Fixed intermittent failures of os.confstr,
os.pathconf and os.sysconf on iOS and Android.
- gh-124927: Non-printing characters are now properly handled
in the new REPL.
- IDLE
- gh-129873: Simplify displaying the IDLE doc by only copying
the text section of idle.html to idlelib/help.html. Patch
by Stan Ulbrych.
- Documentation
- gh-131417: Mention asyncio.Future and asyncio.Task in
generic classes list.
- gh-125722: Require Sphinx 8.2.0 or later to build the
Python documentation. Patch by Adam Turner.
- gh-129712: The wheel tags supported by each macOS universal
SDK option are now documented.
- gh-46236: C API: Document PyUnicode_RSplit(),
PyUnicode_Partition() and PyUnicode_RPartition().
- Core and Builtins
- gh-132011: Fix crash when calling list.append() as an
unbound method.
- gh-131998: Fix a crash when using an unbound method
descriptor object in a function where a bound method
descriptor was used.
- gh-131988: Fix a performance regression that caused scaling
bottlenecks in the free threaded build in 3.13.1 and
3.13.2.
- gh-131719: Fix missing NULL check in _PyMem_FreeDelayed in
free-threaded build.
- gh-131670: Fix anext() failing on sync __anext__() raising
an exception.
- gh-131141: Fix data race in sys.monitoring instrumentation
while registering callback.
- gh-130932: Fix incorrect exception handling in
_PyModule_IsPossiblyShadowing
- gh-130851: Fix a crash in the free threading build when
constructing a code object with co_consts that contains
instances of types that are not otherwise generated by the
bytecode compiler.
- gh-130794: Fix memory leak in the free threaded build
when resizing a shared list or dictionary from multiple
short-lived threads.
- gh-130775: Do not crash on negative column and end_column
in ast locations.
- gh-130382: Fix PyRefTracer_DESTROY not being sent from
Python/ceval.c Py_DECREF().
- gh-130618: Fix a bug that was causing UnicodeDecodeError or
SystemError to be raised when using f-strings with lambda
expressions with non-ASCII characters. Patch by Pablo
Galindo
- gh-130163: Fix possible crashes related to concurrent
change and use of the sys module attributes.
- gh-88887: Fixing multiprocessing Resource Tracker process
leaking, usually observed when running Python as PID 1.
- gh-130115: Fix an issue with thread identifiers being
sign-extended on some platforms.
- gh-128396: Fix a crash that occurs when calling locals()
inside an inline comprehension that uses the same local
variable as the outer frame scope where the variable is a
free or cell var.
- gh-116042: Fix location for SyntaxErrors of invalid escapes
in the tokenizer. Patch by Pablo Galindo
- gh-129983: Fix data race in compile_template in sre.c.
- gh-129967: Fix a race condition in the free threading build
when repr(set) is called concurrently with set.clear().
- gh-129900: Fix return codes inside SystemExit not getting
returned by the REPL.
- gh-129732: Fixed a race in _Py_qsbr_reserve in the free
threading build.
- gh-129643: Fix thread safety of PyList_Insert() in
free-threading builds.
- gh-129668: Fix race condition when raising MemoryError in
the free threaded build.
- gh-129643: Fix thread safety of PyList_SetItem() in
free-threading builds. Patch by Kumar Aditya.
- gh-128714: Fix the potential races in get/set dunder
methods __annotations__, __annotate__ and __type_params__
for function object, and add related tests.
- gh-128632: Disallow __classdict__ as the name of a type
parameter. Using this name would previously crash the
interpreter in some circumstances.
- gh-127953: The time to handle a LINE event in
sys.monitoring (and sys.settrace) is now independent of the
number of lines in the code object.
- gh-125331: from __future__ import barry_as_FLUFL now works
in more contexts, including when it is used in files,
with the -c flag, and in the REPL when there are multiple
statements on the same line. Previously, it worked only
on subsequent lines in the REPL, and when the appropriate
flags were passed directly to compile(). Patch by Pablo
Galindo.
- C API
- gh-131740: Update PyUnstable_GC_VisitObjects to traverse
perm gen.
- gh-129533: Update PyGC_Enable(), PyGC_Disable(),
PyGC_IsEnabled() to use atomic operation for thread-safety
at free-threading build. Patch by Donghee Na.
- Build
- gh-131865: The DTrace build now properly passes the CC
and CFLAGS variables to the dtrace command when utilizing
SystemTap on Linux.
- gh-131675: Fix mimalloc library builds for 32-bit ARM
targets.
- gh-130673: Fix potential KeyError when handling object
sections during JIT building process.
- gh-130740: Ensure that Python.h is included before
stdbool.h unless pyconfig.h is included before or in some
platform-specific contexts.
- gh-129838: Dont redefine _Py_NO_SANITIZE_UNDEFINED when
compiling with a recent GCC version and undefined sanitizer
enabled.
- gh-129660: Drop test_embed from PGO training, whose
contribution in recent versions is considered to be
ignorable.
- Add gh126985-mv-pyvenv.cfg2getpath.patch to remove failing
tests in test_sysconfig.
- Add gh-132535-rsrc-warn-test_timeout.patch to fix
failing tests in the build system without network access
(gh#python/cpython#132535).
-------------------------------------------------------------------
Mon Mar 10 15:44:31 UTC 2025 - Bernhard Wiedemann <bwiedemann@suse.com>

View File

@@ -162,7 +162,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.13.2
Version: 3.13.3
%define tarversion %{version}
%define tarname Python-%{tarversion}
Release: 0
@@ -222,6 +222,12 @@ Patch40: fix-test-recursion-limit-15.6.patch
# PATCH-FIX-SLE doc-py38-to-py36.patch mcepl@suse.com
# Make documentation extensions working with Python 3.6
Patch41: doc-py38-to-py36.patch
# PATCH-FIX-UPSTREAM gh126985-mv-pyvenv.cfg2getpath.patch mcepl@suse.com
# Remove tests failing in test_sysconfig
Patch42: gh126985-mv-pyvenv.cfg2getpath.patch
# PATCH-FIX-UPSTREAM gh-132535-rsrc-warn-test_timeout.patch gh#python/cpython#132535 mcepl@suse.com
# allows test_timeout tests to pass
Patch43: gh-132535-rsrc-warn-test_timeout.patch
BuildRequires: autoconf-archive
BuildRequires: automake
BuildRequires: fdupes
@@ -656,12 +662,6 @@ EXCLUDE="$EXCLUDE test_external_inspection test_faulthandler test_os test_posix
# done have any such interface breaking the uuid module.
EXCLUDE="$EXCLUDE test_uuid"
# bsc#1195140 and bpo#37169 - test_capi is failing on openSUSE, and not sure why
EXCLUDE="$EXCLUDE test_capi"
# Failing tests on python 3.13
EXCLUDE="$EXCLUDE test_regrtest test_sysconfig"
# Limit virtual memory to avoid spurious failures
if test $(ulimit -v) = unlimited || test $(ulimit -v) -gt 10000000; then
ulimit -v 11000000 || :

View File

@@ -1,16 +1,21 @@
---
Lib/test/test_subprocess.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Lib/test/test_subprocess.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -280,7 +280,8 @@ class ProcessTestCase(BaseTestCase):
"time.sleep(3600)"],
# Some heavily loaded buildbots (sparc Debian 3.x) require
# this much time to start and print.
- timeout=3)
+ # OBS might require even more
+ timeout=10)
self.fail("Expected TimeoutExpired.")
self.assertEqual(c.exception.output, b'BDFL')
Index: Python-3.13.3/Lib/test/test_subprocess.py
===================================================================
--- Python-3.13.3.orig/Lib/test/test_subprocess.py 2025-04-08 15:54:08.000000000 +0200
+++ Python-3.13.3/Lib/test/test_subprocess.py 2025-04-11 21:53:36.198770341 +0200
@@ -274,7 +274,11 @@
output = subprocess.check_output(
[sys.executable, "-c",
"import time; time.sleep(3600)"],
- timeout=0.1)
+ # Some heavily loaded buildbots (sparc Debian 3.x) require
+ # this much time to start and print.
+ # timeout=3)
+ # OBS might require even more
+ timeout=10)
def test_call_kwargs(self):
# call() function with keyword args