Compare commits
95 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| b1df85c06b | |||
| 357ebef973 | |||
| d870c1b0f4 | |||
| 4fd7821bea | |||
| 816e164be8 | |||
| 978bc1ef01 | |||
| 976c4e0cef | |||
| 871f5c3f10 | |||
| 37d407017e | |||
| 92b79e3223 | |||
| 3a1acd0d11 | |||
| adca6dee9d | |||
| 2abd69687b | |||
| 9a9b32e012 | |||
| 07a0902464 | |||
| 0bf1e0de48 | |||
| eb5e4cd13f | |||
| a5239f3134 | |||
| eaae274dc4 | |||
| 719d910757 | |||
| 836ffcda65 | |||
| dc9a88a0ec | |||
| a10fb63256 | |||
| e4f03691c0 | |||
| 3def3a278d | |||
| 6ccd98d9bb | |||
| 9ca0c40ae3 | |||
| 395f30367f | |||
| 6efef2d138 | |||
| d2b706c283 | |||
| 6b8c3a8e15 | |||
| e09d046cb9 | |||
| 8966bd89d2 | |||
| 30fabf621d | |||
| d1dd8decb1 | |||
| 4e7fbe78f1 | |||
| 6c5ffdb7d1 | |||
| fb81f0c95c | |||
| 7697c02d21 | |||
| 12f6ddbda4 | |||
| 8412211e61 | |||
| 3375f039d6 | |||
| 45096711fd | |||
| 3ab9737306 | |||
| 47d752bbc6 | |||
| 12d36f6d19 | |||
| cf22122d9a | |||
| 7775db5668 | |||
| 1a68b995e6 | |||
| a5731deb52 | |||
| d4c1e47d44 | |||
| 03c870434a | |||
| abfd0ea83d | |||
| e5ccabe5d6 | |||
| 45b3270bb2 | |||
| 8ea0be1078 | |||
| 5017722c2b | |||
| b4ab74738f | |||
| 07a89b44e8 | |||
| 162040ca05 | |||
| d35133fd4e | |||
| 537e68d716 | |||
| a53af73990 | |||
| 1e2a0f61a9 | |||
| a5a443b789 | |||
| 32830d09d0 | |||
| d4b9fa2439 | |||
| e781d820b1 | |||
| 78ba84f9b1 | |||
| 0da0cdfdf4 | |||
| 888af93a0c | |||
| 308255a772 | |||
| a3ff8ce797 | |||
| 608d0c1bfd | |||
| 48b8355786 | |||
| 4352698329 | |||
| 001d1a2a20 | |||
| 6787a9f29d | |||
| 1221d1c8e1 | |||
| 59a4965535 | |||
| 0a0564a0e9 | |||
| c7b43c0f60 | |||
| b97ac57404 | |||
| 041b675fd8 | |||
| 5886778811 | |||
| 11a8661cb2 | |||
| 1ef6a75b82 | |||
| 74a0bc0ca2 | |||
| b1061c18e5 | |||
| b154095872 | |||
| 069357c85b | |||
| 2a2ec95344 | |||
| 517ba388ca | |||
| a80b53565d | |||
| 8e7a85bd98 |
@@ -24,32 +24,115 @@ Co-authored-by: Miro Hrončok <miro@hroncok.cz>
|
||||
Co-authored-by: Michal Cyprian <m.cyprian@gmail.com>
|
||||
Co-authored-by: Lumír Balhar <frenzy.madness@gmail.com>
|
||||
---
|
||||
Lib/site.py | 9 ++++++++-
|
||||
Lib/test/test_sysconfig.py | 17 +++++++++++++++--
|
||||
2 files changed, 23 insertions(+), 3 deletions(-)
|
||||
Lib/sysconfig/__init__.py | 57 +++++++++++++++++++++++++++++++++++++++++----
|
||||
Lib/test/test_sysconfig.py | 17 +++++++++++--
|
||||
2 files changed, 67 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/Lib/site.py
|
||||
+++ b/Lib/site.py
|
||||
@@ -406,8 +406,15 @@ def getsitepackages(prefixes=None):
|
||||
return sitepackages
|
||||
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']
|
||||
|
||||
def addsitepackages(known_paths, prefixes=None):
|
||||
- """Add site-packages to sys.path"""
|
||||
+ """Add site-packages to sys.path
|
||||
+# For a brief period of time in the Fedora 36 life cycle,
|
||||
+# this installation scheme existed and was documented in the release notes.
|
||||
+# For backwards compatibility, we keep it here (at least on 3.10 and 3.11).
|
||||
+_INSTALL_SCHEMES['rpm_prefix'] = _INSTALL_SCHEMES['posix_prefix']
|
||||
+
|
||||
+ '/usr/local' is included in PREFIXES if RPM build is not detected
|
||||
+ to make packages installed into this location visible.
|
||||
def _get_implementation():
|
||||
return 'Python'
|
||||
|
||||
@@ -167,13 +172,28 @@
|
||||
},
|
||||
}
|
||||
|
||||
+# This is used by distutils.command.install in the stdlib
|
||||
+# as well as pypa/distutils (e.g. bundled in setuptools).
|
||||
+# The self.prefix value is set to sys.prefix + /local/
|
||||
+# if neither RPM build nor virtual environment is
|
||||
+# detected to make distutils install packages
|
||||
+# into the separate location.
|
||||
+# https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
|
||||
+if (not (hasattr(sys, 'real_prefix') or
|
||||
+ sys.prefix != sys.base_prefix) and
|
||||
+ 'RPM_BUILD_ROOT' not in os.environ):
|
||||
+ _prefix_addition = '/local'
|
||||
+
|
||||
+ """
|
||||
_trace("Processing global site-packages")
|
||||
+ if ENABLE_USER_SITE and 'RPM_BUILD_ROOT' not in os.environ:
|
||||
+ PREFIXES.insert(0, "/usr/local")
|
||||
for sitedir in getsitepackages(prefixes):
|
||||
if os.path.isdir(sitedir):
|
||||
addsitedir(sitedir, known_paths)
|
||||
--- a/Lib/test/test_sysconfig.py
|
||||
+++ b/Lib/test/test_sysconfig.py
|
||||
@@ -121,8 +121,19 @@ class TestSysConfig(unittest.TestCase):
|
||||
+
|
||||
_SCHEME_KEYS = ('stdlib', 'platstdlib', 'purelib', 'platlib', 'include',
|
||||
'scripts', 'data')
|
||||
|
||||
_PY_VERSION = sys.version.split()[0]
|
||||
_PY_VERSION_SHORT = f'{sys.version_info[0]}.{sys.version_info[1]}'
|
||||
_PY_VERSION_SHORT_NO_DOT = f'{sys.version_info[0]}{sys.version_info[1]}'
|
||||
+_PREFIX = os.path.normpath(sys.prefix)
|
||||
_BASE_PREFIX = os.path.normpath(sys.base_prefix)
|
||||
+_EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
|
||||
_BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
|
||||
# Mutex guarding initialization of _CONFIG_VARS.
|
||||
_CONFIG_VARS_LOCK = threading.RLock()
|
||||
@@ -266,11 +286,40 @@
|
||||
target_dict[key] = value
|
||||
|
||||
|
||||
+_CONFIG_VARS_LOCAL = None
|
||||
+
|
||||
+
|
||||
+def _config_vars_local():
|
||||
+ # This function returns the config vars with prefixes amended to /usr/local
|
||||
+ # https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
|
||||
+ global _CONFIG_VARS_LOCAL
|
||||
+ if _CONFIG_VARS_LOCAL is None:
|
||||
+ _CONFIG_VARS_LOCAL = dict(get_config_vars())
|
||||
+ _CONFIG_VARS_LOCAL['base'] = '/usr/local'
|
||||
+ _CONFIG_VARS_LOCAL['platbase'] = '/usr/local'
|
||||
+ return _CONFIG_VARS_LOCAL
|
||||
+
|
||||
+
|
||||
def _expand_vars(scheme, vars):
|
||||
res = {}
|
||||
if vars is None:
|
||||
vars = {}
|
||||
- _extend_dict(vars, get_config_vars())
|
||||
+
|
||||
+ # when we are not in a virtual environment or an RPM build
|
||||
+ # we change '/usr' to '/usr/local'
|
||||
+ # to avoid surprises, we explicitly check for the /usr/ prefix
|
||||
+ # Python virtual environments have different prefixes
|
||||
+ # we only do this for posix_prefix, not to mangle the venv scheme
|
||||
+ # posix_prefix is used by sudo pip install
|
||||
+ # we only change the defaults here, so explicit --prefix will take precedence
|
||||
+ # https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
|
||||
+ if (scheme == 'posix_prefix' and
|
||||
+ _PREFIX == '/usr' and
|
||||
+ 'RPM_BUILD_ROOT' not in os.environ):
|
||||
+ _extend_dict(vars, _config_vars_local())
|
||||
+ else:
|
||||
+ _extend_dict(vars, get_config_vars())
|
||||
+
|
||||
if os.name == 'nt':
|
||||
# On Windows we want to substitute 'lib' for schemes rather
|
||||
# than the native value (without modifying vars, in case it
|
||||
@@ -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.
|
||||
- _PREFIX = os.path.normpath(sys.prefix)
|
||||
- _EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
|
||||
- _CONFIG_VARS['prefix'] = _PREFIX # FIXME: This gets overwriten by _init_posix.
|
||||
- _CONFIG_VARS['exec_prefix'] = _EXEC_PREFIX # FIXME: This gets overwriten by _init_posix.
|
||||
+ _CONFIG_VARS['prefix'] = _PREFIX
|
||||
+ _CONFIG_VARS['exec_prefix'] = _EXEC_PREFIX
|
||||
_CONFIG_VARS['py_version'] = _PY_VERSION
|
||||
_CONFIG_VARS['py_version_short'] = _PY_VERSION_SHORT
|
||||
_CONFIG_VARS['py_version_nodot'] = _PY_VERSION_SHORT_NO_DOT
|
||||
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)
|
||||
@@ -70,7 +153,7 @@ Co-authored-by: Lumír Balhar <frenzy.madness@gmail.com>
|
||||
os.path.normpath(expected),
|
||||
)
|
||||
|
||||
@@ -377,7 +388,7 @@ class TestSysConfig(unittest.TestCase):
|
||||
@@ -386,7 +397,7 @@
|
||||
self.assertTrue(os.path.isfile(config_h), config_h)
|
||||
|
||||
def test_get_scheme_names(self):
|
||||
@@ -79,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)))
|
||||
@@ -389,6 +400,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))
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3be094ad08b11dc2a065463524239c78dc9f2b342b01dcd4e1e606dbbc5c78a5
|
||||
size 20841504
|
||||
@@ -1,18 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQKTBAABCgB9FiEEcWlgX2LHUTVtBUomqCHmgOX6YwUFAmZ9d85fFIAAAAAALgAo
|
||||
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDcx
|
||||
Njk2MDVGNjJDNzUxMzU2RDA1NEEyNkE4MjFFNjgwRTVGQTYzMDUACgkQqCHmgOX6
|
||||
YwWXBA//TeNtOZTRpGM4pWnY9GBOvXH+WFyT5k5GQM6AE5ITYhLPkz+Refj3kwPV
|
||||
uF32neYXIJIO3v+vyfFTYyj5jNS5gvGRvjPXe2K5p0K9cv5HpTncob9p8FnTJQRY
|
||||
hqXpzs2q8gjU9YN54wz3SqAFE1ensB2qHlq7EJUABbB+HNWk929TXh+cQwSybRT1
|
||||
XMzdKHc4IO3WCVPKIsMngqglUrj7FhlEgx/C8hmu81zpLVkCzxDXLuEDt7nnHoCG
|
||||
HHcmF8B7kGK6py8KD7n/RZgriXli37tyFHJ0wwCtzwyko73khWVayYyJ53s4Pa5H
|
||||
C6A9eNJMBxAQU/M2uPed+io5xZ8IvzSPs4vJCS8YL+NHTQGubexo5QIIHTP5b7ta
|
||||
JW6s3TDHA8g/b3rGum76ZelJ4dsUJ8TPxNl4fORtsltVLJwol1FLGzb7vK7r/ZTM
|
||||
NBnYFjNjEfe4uWHwsZoLdZzH90Z8bKsUXWz/h4EMjUL3NLgORSE8vbPhpjscmEB/
|
||||
x+DM9IJHQat/s8ijtELuOx9SLpUuFBAmzVkmWVWvlPjFrQ5nw5pWLRzADpEV7/IU
|
||||
XOucXhV4hrc8fJ57dGv0mtpP37DbF/cPMdOC0kA9X4icr1sLwN6MVmQJcFoBcNge
|
||||
LvKvNW8lXxWbdOj0+fIymIXoH+bzJUp8g8l79Hp6QYBM5EOxfso=
|
||||
=KNpM
|
||||
-----END PGP SIGNATURE-----
|
||||
BIN
Python-3.13.7.tar.xz
LFS
Normal file
BIN
Python-3.13.7.tar.xz
LFS
Normal file
Binary file not shown.
1
Python-3.13.7.tar.xz.sigstore
Normal file
1
Python-3.13.7.tar.xz.sigstore
Normal file
@@ -0,0 +1 @@
|
||||
{"mediaType": "application/vnd.dev.sigstore.bundle.v0.3+json", "verificationMaterial": {"certificate": {"rawBytes": "MIICyTCCAlCgAwIBAgIUZMI+1qoqVltZwoOEGQ4+re/SlS4wCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjUwODE0MTM0OTQyWhcNMjUwODE0MTM1OTQyWjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEkKFnh1U6aDYKiIU0p7mtDbbxTezpcJrivGvrwtuUviVav74GRKEp/vcRZnlnVn6olDcrk33qi78husSHeD1VN6OCAW8wggFrMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAdBgNVHQ4EFgQUaes5BWscCJHaWxt5BY13fiF+sb8wHwYDVR0jBBgwFoAU39Ppz1YkEZb5qNjpKFWixi4YZD8wHwYDVR0RAQH/BBUwE4ERdGhvbWFzQHB5dGhvbi5vcmcwKQYKKwYBBAGDvzABAQQbaHR0cHM6Ly9hY2NvdW50cy5nb29nbGUuY29tMCsGCisGAQQBg78wAQgEHQwbaHR0cHM6Ly9hY2NvdW50cy5nb29nbGUuY29tMIGKBgorBgEEAdZ5AgQCBHwEegB4AHYA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGYqNf2TAAABAMARzBFAiB3VC3ZdiYFvHtFHxRfU4vdiUZjC+VM/cY0nUHpRZ+aqQIhALglsfszSnn7LZNgw3no+XTnlO+mzMAdCLArnFKuyQo0MAoGCCqGSM49BAMDA2cAMGQCME73khzLHp2xLGwh1g0U5yt9CZu0YfQ52BJ0gL3J2adJsuCvmr76YbDnGWOM2IJLYwIwbWuLaywCs9V1hHqx4IewPWU6kGTDL2p3t7RMb7OK9etOkF4xHxV9IaGZZSFwDmSC"}, "tlogEntries": [{"logIndex": "394375946", "logId": {"keyId": "wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="}, "kindVersion": {"kind": "hashedrekord", "version": "0.0.1"}, "integratedTime": "1755179382", "inclusionPromise": {"signedEntryTimestamp": "MEYCIQDofYinceCg3x7ldRHdwLc7aoB6pX2+kukjFdQXFflKdwIhAK7YnONsVnbwsSZpLex8Q7tSMHHglIEQaqavuKAD5taI"}, "inclusionProof": {"logIndex": "272471684", "rootHash": "D6O1d0rPsmFUhblg+N/WsWhcTQVKMGbTlauX5huq8Q0=", "treeSize": "272471685", "hashes": ["12rv4cU8JBEnhl8jcQleuU0gXnRpH2B6oGsUtKoIBHQ=", "PXscKvmfKyXbaxsj99FlqImW6Bg1k3WBNWtHTzgtSVk=", "BaDXQZRZZLXILekCZ5e2TyrtJiYKeNUb2BW6hgybhG0=", "IQvrVF5nsAhxYBjFEIIqcy67H9HEwRdM5XEvXGMlcSc=", "I/JNRoCea85lOiusHIKoAblvRmo6NwnDAtfOV/JiSvQ=", "CjR2KouFHnbUwdf0xk9/f1IcsYFdo4/LMKPy9TV0keM=", "uSQzyFvNic+ZM0goS8qbxn95hvb1YCdWvV0/TnqHDEg=", "LM7bDk+koNXHbb9JB2IH+truLnDDC6WfDzp12zjdFkQ=", "4k9InE/ch3n4a/TapEK+nqfXhlMZEcbvL849wNGtBuo=", "6QfFjG3kfyjFx5PdzVrWBdbNza9Mf4ldecvoXhR3Ip8=", "RllwumeGwAfTxo/zlW3B2deC36+2Lu0FY/hP+QL2aT8=", "vS7O4ozHIQZJWBiov+mkpI27GE8zAmVCEkRcP3NDyNE="], "checkpoint": {"envelope": "rekor.sigstore.dev - 1193050959916656506\n272471685\nD6O1d0rPsmFUhblg+N/WsWhcTQVKMGbTlauX5huq8Q0=\n\n\u2014 rekor.sigstore.dev wNI9ajBEAiBr7yQXNBvCAOgKzReWm4ERI79K22ifVZFn9VUxx5nSxQIgWIPYVrO1E+vP3VRWPptUMs1arlLguTIMkT1tX5WCRoM=\n"}}, "canonicalizedBody": "eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiI1NDYyZjkwOTlkZmQzMGUyMzhkZWY4M2M3MWQ5MTg5N2Q4Y2FhNWZmNmViYzdhNTBmMTRkNDgwMmNkYWFhNzlhIn19LCJzaWduYXR1cmUiOnsiY29udGVudCI6Ik1FVUNJUUR4RjM5Z0VUZDgvUWMwbHd5Sk5Mbk5NK3RrTmozaEYyWE1DelZDdjZXOEJBSWdkQUxIWTl3MU14bVNKYUNKMlNtL1p5QWRrL1gwSVF4THFENHA3TSt5UzZRPSIsInB1YmxpY0tleSI6eyJjb250ZW50IjoiTFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVTjVWRU5EUVd4RFowRjNTVUpCWjBsVldrMUpLekZ4YjNGV2JIUmFkMjlQUlVkUk5DdHlaUzlUYkZNMGQwTm5XVWxMYjFwSmVtb3dSVUYzVFhjS1RucEZWazFDVFVkQk1WVkZRMmhOVFdNeWJHNWpNMUoyWTIxVmRWcEhWakpOVWpSM1NFRlpSRlpSVVVSRmVGWjZZVmRrZW1SSE9YbGFVekZ3WW01U2JBcGpiVEZzV2tkc2FHUkhWWGRJYUdOT1RXcFZkMDlFUlRCTlZFMHdUMVJSZVZkb1kwNU5hbFYzVDBSRk1FMVVUVEZQVkZGNVYycEJRVTFHYTNkRmQxbElDa3R2V2tsNmFqQkRRVkZaU1V0dldrbDZhakJFUVZGalJGRm5RVVZyUzBadWFERlZObUZFV1V0cFNWVXdjRGR0ZEVSaVluaFVaWHB3WTBweWFYWkhkbklLZDNSMVZYWnBWbUYyTnpSSFVrdEZjQzkyWTFKYWJteHVWbTQyYjJ4RVkzSnJNek54YVRjNGFIVnpVMGhsUkRGV1RqWlBRMEZYT0hkblowWnlUVUUwUndwQk1WVmtSSGRGUWk5M1VVVkJkMGxJWjBSQlZFSm5UbFpJVTFWRlJFUkJTMEpuWjNKQ1owVkdRbEZqUkVGNlFXUkNaMDVXU0ZFMFJVWm5VVlZoWlhNMUNrSlhjMk5EU2toaFYzaDBOVUpaTVRObWFVWXJjMkk0ZDBoM1dVUldVakJxUWtKbmQwWnZRVlV6T1ZCd2VqRlphMFZhWWpWeFRtcHdTMFpYYVhocE5Ga0tXa1E0ZDBoM1dVUldVakJTUVZGSUwwSkNWWGRGTkVWU1pFZG9kbUpYUm5wUlNFSTFaRWRvZG1KcE5YWmpiV04zUzFGWlMwdDNXVUpDUVVkRWRucEJRZ3BCVVZGaVlVaFNNR05JVFRaTWVUbG9XVEpPZG1SWE5UQmplVFZ1WWpJNWJtSkhWWFZaTWpsMFRVTnpSME5wYzBkQlVWRkNaemM0ZDBGUlowVklVWGRpQ21GSVVqQmpTRTAyVEhrNWFGa3lUblprVnpVd1kzazFibUl5T1c1aVIxVjFXVEk1ZEUxSlIwdENaMjl5UW1kRlJVRmtXalZCWjFGRFFraDNSV1ZuUWpRS1FVaFpRVE5VTUhkaGMySklSVlJLYWtkU05HTnRWMk16UVhGS1MxaHlhbVZRU3pNdmFEUndlV2RET0hBM2J6UkJRVUZIV1hGT1pqSlVRVUZCUWtGTlFRcFNla0pHUVdsQ00xWkRNMXBrYVZsR2RraDBSa2g0VW1aVk5IWmthVlZhYWtNclZrMHZZMWt3YmxWSWNGSmFLMkZ4VVVsb1FVeG5iSE5tYzNwVGJtNDNDa3hhVG1kM00yNXZLMWhVYm14UEsyMTZUVUZrUTB4QmNtNUdTM1Y1VVc4d1RVRnZSME5EY1VkVFRUUTVRa0ZOUkVFeVkwRk5SMUZEVFVVM00ydG9la3dLU0hBeWVFeEhkMmd4WnpCVk5YbDBPVU5hZFRCWlpsRTFNa0pLTUdkTU0wb3lZV1JLYzNWRGRtMXlOelpaWWtSdVIxZFBUVEpKU2t4WmQwbDNZbGQxVEFwaGVYZERjemxXTVdoSWNYZzBTV1YzVUZkVk5tdEhWRVJNTW5BemREZFNUV0kzVDBzNVpYUlBhMFkwZUVoNFZqbEpZVWRhV2xOR2QwUnRVME1LTFMwdExTMUZUa1FnUTBWU1ZFbEdTVU5CVkVVdExTMHRMUW89In19fX0="}], "timestampVerificationData": {}}, "messageSignature": {"messageDigest": {"algorithm": "SHA2_256", "digest": "VGL5CZ39MOI43vg8cdkYl9jKpf9uvHpQ8U1IAs2qp5o="}, "signature": "MEUCIQDxF39gETd8/Qc0lwyJNLnNM+tkNj3hF2XMCzVCv6W8BAIgdALHY9w1MxmSJaCJ2Sm/ZyAdk/X0IQxLqD4p7M+yS6Q="}}
|
||||
@@ -1,4 +1,6 @@
|
||||
<multibuild>
|
||||
<package>base</package>
|
||||
<package>doc</package>
|
||||
<package>nogil</package>
|
||||
<package>nogil-base</package>
|
||||
</multibuild>
|
||||
|
||||
BIN
bluez-devel-vendor.tar.xz
LFS
BIN
bluez-devel-vendor.tar.xz
LFS
Binary file not shown.
@@ -5,28 +5,30 @@ 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
|
||||
@@ -61,7 +61,11 @@ is at least as recent as the one availab
|
||||
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 @@ Module API
|
||||
Returns a string specifying the available version of pip that will be
|
||||
installed when bootstrapping an environment.
|
||||
|
||||
@@ -35,7 +37,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 @@ Module API
|
||||
If *root* is ``None``, then installation uses the default install location
|
||||
for the current environment.
|
||||
|
||||
@@ -44,7 +46,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 @@ Module API
|
||||
*verbosity* controls the level of output to :data:`sys.stdout` from the
|
||||
bootstrapping operation.
|
||||
|
||||
@@ -139,7 +141,7 @@ Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
|
||||
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -2142,7 +2142,7 @@ install: @FRAMEWORKINSTALLFIRST@ @INSTAL
|
||||
@@ -2145,7 +2145,7 @@ install: @FRAMEWORKINSTALLFIRST@ @INSTAL
|
||||
install|*) ensurepip="" ;; \
|
||||
esac; \
|
||||
$(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
|
||||
@@ -148,7 +150,7 @@ Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
|
||||
fi
|
||||
|
||||
.PHONY: altinstall
|
||||
@@ -2153,7 +2153,7 @@ altinstall: commoninstall
|
||||
@@ -2156,7 +2156,7 @@ altinstall: commoninstall
|
||||
install|*) ensurepip="--altinstall" ;; \
|
||||
esac; \
|
||||
$(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
|
||||
|
||||
45
bsc1243155-sphinx-non-determinism.patch
Normal file
45
bsc1243155-sphinx-non-determinism.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
From 906a590df191f66f4f0c4a70e3edb6fd82c156ef Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
|
||||
Date: Tue, 1 Jul 2025 12:13:28 +0200
|
||||
Subject: [PATCH] Doc: Generate ids for audit_events using docname
|
||||
|
||||
This patch generates ids for audit_events using the docname so the id is
|
||||
not global but depend on the source file. This make the doc build
|
||||
reproducible with multiple cores because it doesn't which file is parsed
|
||||
first, the id for audit_events will always be consistent independently
|
||||
of what file is parsed first.
|
||||
|
||||
https://github.com/python/cpython/issues/130979
|
||||
---
|
||||
Doc/tools/extensions/audit_events.py | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: Python-3.13.6/Doc/tools/extensions/audit_events.py
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/tools/extensions/audit_events.py 2025-08-07 12:16:58.257103336 +0200
|
||||
+++ Python-3.13.6/Doc/tools/extensions/audit_events.py 2025-08-07 12:17:02.709401389 +0200
|
||||
@@ -72,8 +72,13 @@
|
||||
logger.warning(msg)
|
||||
return
|
||||
|
||||
- def id_for(self, name) -> str:
|
||||
- source_count = len(self.sources.get(name, set()))
|
||||
+ def _source_count(self, name, docname) -> int:
|
||||
+ """Count the event name in the same source"""
|
||||
+ sources = self.sources.get(name, set())
|
||||
+ return len([s for s, t in sources if s == docname])
|
||||
+
|
||||
+ def id_for(self, name, docname) -> str:
|
||||
+ source_count = self._source_count(name, docname)
|
||||
name_clean = re.sub(r"\W", "_", name)
|
||||
return f"audit_event_{name_clean}_{source_count}"
|
||||
|
||||
@@ -148,7 +153,7 @@
|
||||
except (IndexError, TypeError):
|
||||
target = None
|
||||
if not target:
|
||||
- target = self.env.audit_events.id_for(name)
|
||||
+ target = self.env.audit_events.id_for(name, self.env.docname)
|
||||
ids.append(target)
|
||||
self.env.audit_events.add_event(name, args, (self.env.docname, target))
|
||||
|
||||
918
doc-py38-to-py36.patch
Normal file
918
doc-py38-to-py36.patch
Normal file
@@ -0,0 +1,918 @@
|
||||
---
|
||||
Doc/Makefile | 8 +--
|
||||
Doc/c-api/arg.rst | 1
|
||||
Doc/c-api/typeobj.rst | 8 +--
|
||||
Doc/conf.py | 29 ++++++++++---
|
||||
Doc/howto/free-threading-python.rst | 2
|
||||
Doc/library/doctest.rst | 1
|
||||
Doc/library/email.compat32-message.rst | 1
|
||||
Doc/library/xml.etree.elementtree.rst | 1
|
||||
Doc/Makefile | 8 +--
|
||||
Doc/c-api/arg.rst | 1
|
||||
Doc/c-api/typeobj.rst | 8 +--
|
||||
Doc/conf.py | 29 ++++++++++---
|
||||
Doc/library/doctest.rst | 1
|
||||
Doc/library/email.compat32-message.rst | 1
|
||||
Doc/library/xml.etree.elementtree.rst | 1
|
||||
Doc/tools/check-warnings.py | 5 +-
|
||||
Doc/tools/extensions/audit_events.py | 56 ++++++++++++++------------
|
||||
Doc/tools/extensions/availability.py | 15 +++---
|
||||
Doc/tools/extensions/c_annotations.py | 53 ++++++++++++++++--------
|
||||
Doc/tools/extensions/changes.py | 8 +--
|
||||
Doc/tools/extensions/glossary_search.py | 20 ++++++---
|
||||
Doc/tools/extensions/implementation_detail.py | 22 +++-------
|
||||
Doc/tools/extensions/issue_role.py | 16 ++-----
|
||||
Doc/tools/extensions/misc_news.py | 14 ++----
|
||||
Doc/tools/extensions/patchlevel.py | 9 ++--
|
||||
Doc/tools/extensions/pydoc_topics.py | 22 +++++-----
|
||||
18 files changed, 159 insertions(+), 130 deletions(-)
|
||||
|
||||
Index: Python-3.13.6/Doc/Makefile
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/Makefile 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/Makefile 2025-08-07 12:16:58.253706854 +0200
|
||||
@@ -14,15 +14,15 @@
|
||||
SOURCES =
|
||||
DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py)
|
||||
REQUIREMENTS = requirements.txt
|
||||
-SPHINXERRORHANDLING = --fail-on-warning
|
||||
+SPHINXERRORHANDLING =
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = --define latex_elements.papersize=a4paper
|
||||
PAPEROPT_letter = --define latex_elements.papersize=letterpaper
|
||||
|
||||
-ALLSPHINXOPTS = --builder $(BUILDER) \
|
||||
- --doctree-dir build/doctrees \
|
||||
- --jobs $(JOBS) \
|
||||
+ALLSPHINXOPTS = -b $(BUILDER) \
|
||||
+ -d build/doctrees \
|
||||
+ -j $(JOBS) \
|
||||
$(PAPEROPT_$(PAPER)) \
|
||||
$(SPHINXOPTS) $(SPHINXERRORHANDLING) \
|
||||
. build/$(BUILDER) $(SOURCES)
|
||||
Index: Python-3.13.6/Doc/c-api/arg.rst
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/c-api/arg.rst 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/c-api/arg.rst 2025-08-07 12:16:58.254160756 +0200
|
||||
@@ -334,7 +334,6 @@
|
||||
should raise an exception and leave the content of *address* unmodified.
|
||||
|
||||
.. c:macro:: Py_CLEANUP_SUPPORTED
|
||||
- :no-typesetting:
|
||||
|
||||
If the *converter* returns :c:macro:`!Py_CLEANUP_SUPPORTED`, it may get called a
|
||||
second time if the argument parsing eventually fails, giving the converter a
|
||||
Index: Python-3.13.6/Doc/c-api/typeobj.rst
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/c-api/typeobj.rst 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/c-api/typeobj.rst 2025-08-07 12:16:58.254692184 +0200
|
||||
@@ -610,7 +610,7 @@
|
||||
Functions like :c:func:`PyObject_NewVar` will take the value of N as an
|
||||
argument, and store in the instance's :c:member:`~PyVarObject.ob_size` field.
|
||||
Note that the :c:member:`~PyVarObject.ob_size` field may later be used for
|
||||
- other purposes. For example, :py:type:`int` instances use the bits of
|
||||
+ other purposes. For example, :py:obj:`int` instances use the bits of
|
||||
:c:member:`~PyVarObject.ob_size` in an implementation-defined
|
||||
way; the underlying storage and its size should be accessed using
|
||||
:c:func:`PyLong_Export`.
|
||||
@@ -622,9 +622,9 @@
|
||||
|
||||
Also, the presence of an :c:member:`~PyVarObject.ob_size` field in the
|
||||
instance layout doesn't mean that the instance structure is variable-length.
|
||||
- For example, the :py:type:`list` type has fixed-length instances, yet those
|
||||
+ For example, the :py:obj:`list` type has fixed-length instances, yet those
|
||||
instances have a :c:member:`~PyVarObject.ob_size` field.
|
||||
- (As with :py:type:`int`, avoid reading lists' :c:member:`!ob_size` directly.
|
||||
+ (As with :py:obj:`int`, avoid reading lists' :c:member:`!ob_size` directly.
|
||||
Call :c:func:`PyList_Size` instead.)
|
||||
|
||||
The :c:member:`!tp_basicsize` includes size needed for data of the type's
|
||||
@@ -637,7 +637,7 @@
|
||||
In other words, :c:member:`!tp_basicsize` must be greater than or equal
|
||||
to the base's :c:member:`!tp_basicsize`.
|
||||
|
||||
- Since every type is a subtype of :py:type:`object`, this struct must
|
||||
+ Since every type is a subtype of :py:obj:`object`, this struct must
|
||||
include :c:type:`PyObject` or :c:type:`PyVarObject` (depending on
|
||||
whether :c:member:`~PyVarObject.ob_size` should be included). These are
|
||||
usually defined by the macro :c:macro:`PyObject_HEAD` or
|
||||
Index: Python-3.13.6/Doc/conf.py
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/conf.py 2025-08-07 12:16:45.115568663 +0200
|
||||
+++ Python-3.13.6/Doc/conf.py 2025-08-07 12:16:58.255236531 +0200
|
||||
@@ -11,6 +11,8 @@
|
||||
from importlib import import_module
|
||||
from importlib.util import find_spec
|
||||
|
||||
+from sphinx import version_info
|
||||
+
|
||||
# Make our custom extensions available to Sphinx
|
||||
sys.path.append(os.path.abspath('tools/extensions'))
|
||||
sys.path.append(os.path.abspath('includes'))
|
||||
@@ -57,11 +59,11 @@
|
||||
import _tkinter
|
||||
except ImportError:
|
||||
_tkinter = None
|
||||
-# Treat warnings as errors, done here to prevent warnings in Sphinx code from
|
||||
-# causing spurious CPython test failures.
|
||||
-import warnings
|
||||
-warnings.simplefilter('error')
|
||||
-del warnings
|
||||
+# # Treat warnings as errors, done here to prevent warnings in Sphinx code from
|
||||
+# # causing spurious CPython test failures.
|
||||
+# import warnings
|
||||
+# warnings.simplefilter('error')
|
||||
+# del warnings
|
||||
'''
|
||||
|
||||
manpages_url = 'https://manpages.debian.org/{path}'
|
||||
@@ -96,7 +98,7 @@
|
||||
|
||||
# Minimum version of sphinx required
|
||||
# Keep this version in sync with ``Doc/requirements.txt``.
|
||||
-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.
|
||||
@@ -258,6 +260,9 @@
|
||||
# Avoid a warning with Sphinx >= 4.0
|
||||
root_doc = 'contents'
|
||||
|
||||
+# Compatibility on old Sphinx
|
||||
+suppress_warnings = ['pygments.ParserNotFound']
|
||||
+
|
||||
# Allow translation of index directives
|
||||
gettext_additional_targets = [
|
||||
'index',
|
||||
@@ -297,7 +302,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", "")
|
||||
-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,
|
||||
@@ -542,6 +547,16 @@
|
||||
}
|
||||
extlinks_detect_hardcoded_links = True
|
||||
|
||||
+if version_info[:2] < (8, 1):
|
||||
+ # Sphinx 8.1 has in-built CVE and CWE roles.
|
||||
+ extlinks.update({
|
||||
+ "cve": (
|
||||
+ "https://www.cve.org/CVERecord?id=CVE-%s",
|
||||
+ "CVE-%s",
|
||||
+ ),
|
||||
+ "cwe": ("https://cwe.mitre.org/data/definitions/%s.html", "CWE-%s"),
|
||||
+ })
|
||||
+
|
||||
# Options for c_annotations extension
|
||||
# -----------------------------------
|
||||
|
||||
Index: Python-3.13.6/Doc/library/doctest.rst
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/library/doctest.rst 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/library/doctest.rst 2025-08-07 12:16:58.255583157 +0200
|
||||
@@ -310,7 +310,6 @@
|
||||
.. currentmodule:: None
|
||||
|
||||
.. attribute:: module.__test__
|
||||
- :no-typesetting:
|
||||
|
||||
.. currentmodule:: doctest
|
||||
|
||||
Index: Python-3.13.6/Doc/library/email.compat32-message.rst
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/library/email.compat32-message.rst 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/library/email.compat32-message.rst 2025-08-07 12:16:58.256095517 +0200
|
||||
@@ -7,7 +7,6 @@
|
||||
:synopsis: The base class representing email messages in a fashion
|
||||
backward compatible with Python 3.2
|
||||
:noindex:
|
||||
- :no-index:
|
||||
|
||||
|
||||
The :class:`Message` class is very similar to the
|
||||
Index: Python-3.13.6/Doc/library/xml.etree.elementtree.rst
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/library/xml.etree.elementtree.rst 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/library/xml.etree.elementtree.rst 2025-08-07 12:16:58.256380542 +0200
|
||||
@@ -873,7 +873,6 @@
|
||||
|
||||
.. module:: xml.etree.ElementTree
|
||||
:noindex:
|
||||
- :no-index:
|
||||
|
||||
.. class:: Element(tag, attrib={}, **extra)
|
||||
|
||||
Index: Python-3.13.6/Doc/tools/check-warnings.py
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/tools/check-warnings.py 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/tools/check-warnings.py 2025-08-07 12:16:58.256796101 +0200
|
||||
@@ -228,7 +228,8 @@
|
||||
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
|
||||
@@ -316,7 +317,7 @@
|
||||
|
||||
cwd = str(Path.cwd()) + os.path.sep
|
||||
files_with_nits = {
|
||||
- warning.removeprefix(cwd).split(":")[0]
|
||||
+ (warning[len(cwd):].split(":")[0] if warning.startswith(cwd) else warning.split(":")[0])
|
||||
for warning in warnings
|
||||
if "Doc/" in warning
|
||||
}
|
||||
Index: Python-3.13.6/Doc/tools/extensions/audit_events.py
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/tools/extensions/audit_events.py 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/tools/extensions/audit_events.py 2025-08-07 12:16:58.257103336 +0200
|
||||
@@ -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,19 @@
|
||||
from sphinx.util import logging
|
||||
from sphinx.util.docutils import SphinxDirective
|
||||
|
||||
-if TYPE_CHECKING:
|
||||
- from collections.abc import Iterator, Set
|
||||
+from typing import Any, Iterator, List, Set, Tuple
|
||||
+
|
||||
+from sphinx.application import Sphinx
|
||||
+from sphinx.builders import Builder
|
||||
+from sphinx.environment import BuildEnvironment
|
||||
+
|
||||
+# --- The Monkey Patch ---
|
||||
+def findall_patch(self, *args, **kwargs):
|
||||
+ """A backwards-compatible findall method that calls traverse."""
|
||||
+ return self.traverse(*args, **kwargs)
|
||||
|
||||
- from sphinx.application import Sphinx
|
||||
- from sphinx.builders import Builder
|
||||
- from sphinx.environment import BuildEnvironment
|
||||
+if not hasattr(nodes.Node, 'findall'):
|
||||
+ nodes.Node.findall = findall_patch
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -32,16 +36,16 @@
|
||||
|
||||
class AuditEvents:
|
||||
def __init__(self) -> None:
|
||||
- self.events: dict[str, list[str]] = {}
|
||||
- self.sources: dict[str, set[tuple[str, str]]] = {}
|
||||
+ self.events: dict[str, List[str]] = {}
|
||||
+ self.sources: dict[str, Set[Tuple[str, str]]] = {}
|
||||
|
||||
- def __iter__(self) -> Iterator[tuple[str, list[str], tuple[str, str]]]:
|
||||
+ def __iter__(self) -> Iterator[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 +53,7 @@
|
||||
self.events[name] = args
|
||||
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 +64,7 @@
|
||||
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 +77,7 @@
|
||||
name_clean = re.sub(r"\W", "_", name)
|
||||
return f"audit_event_{name_clean}_{source_count}"
|
||||
|
||||
- def rows(self) -> Iterator[tuple[str, list[str], Set[tuple[str, str]]]]:
|
||||
+ def rows(self) -> Iterator[Any]:
|
||||
for name in sorted(self.events.keys()):
|
||||
yield name, self.events[name], self.sources[name]
|
||||
|
||||
@@ -97,7 +101,7 @@
|
||||
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 +130,16 @@
|
||||
),
|
||||
]
|
||||
|
||||
- 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 +175,7 @@
|
||||
|
||||
|
||||
class AuditEventListDirective(SphinxDirective):
|
||||
- def run(self) -> list[audit_event_list]:
|
||||
+ def run(self) -> List[audit_event_list]:
|
||||
return [audit_event_list()]
|
||||
|
||||
|
||||
@@ -217,8 +223,8 @@
|
||||
builder: Builder,
|
||||
docname: str,
|
||||
name: str,
|
||||
- args: list[str],
|
||||
- sources: Set[tuple[str, str]],
|
||||
+ args: List[str],
|
||||
+ sources: Set[Tuple[str, str]],
|
||||
) -> nodes.row:
|
||||
row = nodes.row()
|
||||
name_node = nodes.paragraph("", nodes.Text(name))
|
||||
Index: Python-3.13.6/Doc/tools/extensions/availability.py
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/tools/extensions/availability.py 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/tools/extensions/availability.py 2025-08-07 12:16:58.257352322 +0200
|
||||
@@ -1,8 +1,6 @@
|
||||
"""Support for documenting platform availability"""
|
||||
|
||||
-from __future__ import annotations
|
||||
-
|
||||
-from typing import TYPE_CHECKING
|
||||
+from typing import Dict, List, TYPE_CHECKING, Union
|
||||
|
||||
from docutils import nodes
|
||||
from sphinx import addnodes
|
||||
@@ -55,7 +53,7 @@
|
||||
optional_arguments = 0
|
||||
final_argument_whitespace = True
|
||||
|
||||
- def run(self) -> list[nodes.container]:
|
||||
+ def run(self) -> List[nodes.container]:
|
||||
title = sphinx_gettext("Availability")
|
||||
refnode = addnodes.pending_xref(
|
||||
title,
|
||||
@@ -79,7 +77,7 @@
|
||||
|
||||
return [cnode]
|
||||
|
||||
- def parse_platforms(self) -> dict[str, str | bool]:
|
||||
+ def parse_platforms(self) -> Dict[str, Union[str, bool]]:
|
||||
"""Parse platform information from arguments
|
||||
|
||||
Arguments is a comma-separated string of platforms. A platform may
|
||||
@@ -98,12 +96,13 @@
|
||||
platform, _, version = arg.partition(" >= ")
|
||||
if platform.startswith("not "):
|
||||
version = False
|
||||
- platform = platform.removeprefix("not ")
|
||||
+ platform = platform[len("not "):]
|
||||
elif not version:
|
||||
version = True
|
||||
platforms[platform] = version
|
||||
|
||||
- if unknown := set(platforms).difference(KNOWN_PLATFORMS):
|
||||
+ unknown = set(platforms).difference(KNOWN_PLATFORMS)
|
||||
+ if unknown:
|
||||
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 @@
|
||||
return platforms
|
||||
|
||||
|
||||
-def setup(app: Sphinx) -> ExtensionMetadata:
|
||||
+def setup(app):
|
||||
app.add_directive("availability", Availability)
|
||||
|
||||
return {
|
||||
Index: Python-3.13.6/Doc/tools/extensions/c_annotations.py
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/tools/extensions/c_annotations.py 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/tools/extensions/c_annotations.py 2025-08-07 12:16:58.257571556 +0200
|
||||
@@ -9,22 +9,26 @@
|
||||
* 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
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.statemachine import StringList
|
||||
-from sphinx import addnodes
|
||||
+from sphinx import addnodes, version_info
|
||||
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
|
||||
+
|
||||
+# --- The Monkey Patch ---
|
||||
+def findall_patch(self, *args, **kwargs):
|
||||
+ """A backwards-compatible findall method that calls traverse."""
|
||||
+ return self.traverse(*args, **kwargs)
|
||||
+
|
||||
+if not hasattr(nodes.Node, 'findall'):
|
||||
+ nodes.Node.findall = findall_patch
|
||||
|
||||
ROLE_TO_OBJECT_TYPE = {
|
||||
"func": "function",
|
||||
@@ -35,20 +39,20 @@
|
||||
}
|
||||
|
||||
|
||||
-@dataclasses.dataclass(slots=True)
|
||||
+@dataclasses.dataclass()
|
||||
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
|
||||
|
||||
|
||||
-@dataclasses.dataclass(frozen=True, slots=True)
|
||||
+@dataclasses.dataclass(frozen=True)
|
||||
class StableABIEntry:
|
||||
# Role of the object.
|
||||
# Source: Each [item_kind] in stable_abi.toml is mapped to a C Domain role.
|
||||
@@ -67,7 +71,7 @@
|
||||
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():
|
||||
@@ -103,7 +107,7 @@
|
||||
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):
|
||||
@@ -123,11 +127,14 @@
|
||||
continue
|
||||
if not par[0].get("ids", None):
|
||||
continue
|
||||
- name = par[0]["ids"][0].removeprefix("c.")
|
||||
+ name = par[0]["ids"][0]
|
||||
+ if name.startswith("c."):
|
||||
+ name = name[len("c."):]
|
||||
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}: "
|
||||
@@ -234,7 +241,7 @@
|
||||
)
|
||||
|
||||
|
||||
-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.")
|
||||
@@ -254,7 +261,7 @@
|
||||
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}`"
|
||||
@@ -277,13 +284,23 @@
|
||||
)
|
||||
|
||||
|
||||
-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)
|
||||
app.connect("builder-inited", init_annotations)
|
||||
app.connect("doctree-read", add_annotations)
|
||||
|
||||
+ if version_info[:2] < (7, 2):
|
||||
+ from docutils.parsers.rst import directives
|
||||
+ from sphinx.domains.c import CObject
|
||||
+
|
||||
+ # monkey-patch C object...
|
||||
+ CObject.option_spec.update({
|
||||
+ "no-index-entry": directives.flag,
|
||||
+ "no-contents-entry": directives.flag,
|
||||
+ })
|
||||
+
|
||||
return {
|
||||
"version": "1.0",
|
||||
"parallel_read_safe": True,
|
||||
Index: Python-3.13.6/Doc/tools/extensions/changes.py
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/tools/extensions/changes.py 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/tools/extensions/changes.py 2025-08-07 12:16:58.257773818 +0200
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Support for documenting version of changes, additions, deprecations."""
|
||||
|
||||
-from __future__ import annotations
|
||||
-
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from sphinx.domains.changeset import (
|
||||
@@ -25,7 +23,7 @@
|
||||
|
||||
|
||||
class PyVersionChange(VersionChange):
|
||||
- def run(self) -> list[Node]:
|
||||
+ def run(self) -> "list[Node]":
|
||||
# Replace the 'next' special token with the current development version
|
||||
self.arguments[0] = expand_version_arg(
|
||||
self.arguments[0], self.config.release
|
||||
@@ -43,7 +41,7 @@
|
||||
"Deprecated since version %s, removed in version %s"
|
||||
)
|
||||
|
||||
- def run(self) -> list[Node]:
|
||||
+ def run(self) -> "list[Node]":
|
||||
# Replace the first two arguments (deprecated version and removed version)
|
||||
# with a single tuple of both versions.
|
||||
version_deprecated = expand_version_arg(
|
||||
@@ -73,7 +71,7 @@
|
||||
versionlabel_classes[self.name] = ""
|
||||
|
||||
|
||||
-def setup(app: Sphinx) -> ExtensionMetadata:
|
||||
+def setup(app: "Sphinx") -> "ExtensionMetadata":
|
||||
# Override Sphinx's directives with support for 'next'
|
||||
app.add_directive("versionadded", PyVersionChange, override=True)
|
||||
app.add_directive("versionchanged", PyVersionChange, override=True)
|
||||
Index: Python-3.13.6/Doc/tools/extensions/glossary_search.py
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/tools/extensions/glossary_search.py 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/tools/extensions/glossary_search.py 2025-08-07 12:16:58.257959947 +0200
|
||||
@@ -1,21 +1,27 @@
|
||||
"""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__)
|
||||
|
||||
+from docutils import nodes
|
||||
+from sphinx import addnodes
|
||||
+
|
||||
+# --- The Monkey Patch ---
|
||||
+def findall_patch(self, *args, **kwargs):
|
||||
+ """A backwards-compatible findall method that calls traverse."""
|
||||
+ return self.traverse(*args, **kwargs)
|
||||
+
|
||||
+if not hasattr(nodes.Node, 'findall'):
|
||||
+ nodes.Node.findall = findall_patch
|
||||
|
||||
def process_glossary_nodes(
|
||||
app: Sphinx,
|
||||
@@ -52,7 +58,7 @@
|
||||
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)
|
||||
|
||||
Index: Python-3.13.6/Doc/tools/extensions/implementation_detail.py
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/tools/extensions/implementation_detail.py 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/tools/extensions/implementation_detail.py 2025-08-07 12:16:58.258140488 +0200
|
||||
@@ -1,17 +1,10 @@
|
||||
"""Support for marking up implementation details."""
|
||||
|
||||
-from __future__ import annotations
|
||||
-
|
||||
-from typing import TYPE_CHECKING
|
||||
-
|
||||
from docutils import nodes
|
||||
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
|
||||
|
||||
class ImplementationDetail(SphinxDirective):
|
||||
has_content = True
|
||||
@@ -21,23 +14,24 @@
|
||||
label_text = sphinx_gettext("CPython implementation detail:")
|
||||
|
||||
def run(self):
|
||||
- self.assert_has_content()
|
||||
- content_nodes = self.parse_content_to_nodes()
|
||||
+ container_node = nodes.container()
|
||||
+ container_node.document = self.state.document # Ensure node has document context
|
||||
+ self.state.nested_parse(self.content, self.content_offset, container_node)
|
||||
+ parsed_nodes = container_node.children
|
||||
|
||||
# insert our prefix at the start of the first paragraph
|
||||
- first_node = content_nodes[0]
|
||||
+ first_node = parsed_nodes[0]
|
||||
first_node[:0] = [
|
||||
nodes.strong(self.label_text, self.label_text),
|
||||
nodes.Text(" "),
|
||||
]
|
||||
|
||||
- # create a new compound container node
|
||||
- cnode = nodes.compound("", *content_nodes, classes=["impl-detail"])
|
||||
+ cnode = nodes.compound("", *parsed_nodes, classes=["impl-detail"])
|
||||
self.set_source_info(cnode)
|
||||
return [cnode]
|
||||
|
||||
|
||||
-def setup(app: Sphinx) -> ExtensionMetadata:
|
||||
+def setup(app: Sphinx):
|
||||
app.add_directive("impl-detail", ImplementationDetail)
|
||||
|
||||
return {
|
||||
Index: Python-3.13.6/Doc/tools/extensions/issue_role.py
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/tools/extensions/issue_role.py 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/tools/extensions/issue_role.py 2025-08-07 12:16:58.258306293 +0200
|
||||
@@ -1,22 +1,18 @@
|
||||
"""Support for referencing issues in the tracker."""
|
||||
|
||||
-from __future__ import annotations
|
||||
-
|
||||
-from typing import TYPE_CHECKING
|
||||
+from typing import TYPE_CHECKING, List, Tuple
|
||||
|
||||
from docutils import nodes
|
||||
from sphinx.util.docutils import SphinxRole
|
||||
|
||||
-if TYPE_CHECKING:
|
||||
- from docutils.nodes import Element
|
||||
- from sphinx.application import Sphinx
|
||||
- from sphinx.util.typing import ExtensionMetadata
|
||||
+from docutils.nodes import Element
|
||||
+from sphinx.application import Sphinx
|
||||
|
||||
|
||||
class BPOIssue(SphinxRole):
|
||||
ISSUE_URI = "https://bugs.python.org/issue?@action=redirect&bpo={0}"
|
||||
|
||||
- def run(self) -> tuple[list[Element], list[nodes.system_message]]:
|
||||
+ def run(self) -> Tuple[List[Element], List[nodes.system_message]]:
|
||||
issue = self.text
|
||||
|
||||
# sanity check: there are no bpo issues within these two values
|
||||
@@ -38,7 +34,7 @@
|
||||
class GitHubIssue(SphinxRole):
|
||||
ISSUE_URI = "https://github.com/python/cpython/issues/{0}"
|
||||
|
||||
- def run(self) -> tuple[list[Element], list[nodes.system_message]]:
|
||||
+ def run(self) -> Tuple[List[Element], List[nodes.system_message]]:
|
||||
issue = self.text
|
||||
|
||||
# sanity check: all GitHub issues have ID >= 32426
|
||||
@@ -58,7 +54,7 @@
|
||||
return [refnode], []
|
||||
|
||||
|
||||
-def setup(app: Sphinx) -> ExtensionMetadata:
|
||||
+def setup(app: Sphinx) -> "ExtensionMetadata":
|
||||
app.add_role("issue", BPOIssue())
|
||||
app.add_role("gh", GitHubIssue())
|
||||
|
||||
Index: Python-3.13.6/Doc/tools/extensions/misc_news.py
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/tools/extensions/misc_news.py 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/tools/extensions/misc_news.py 2025-08-07 12:16:58.258481107 +0200
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Support for including Misc/NEWS."""
|
||||
|
||||
-from __future__ import annotations
|
||||
-
|
||||
import re
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING
|
||||
@@ -24,13 +22,13 @@
|
||||
+++++++++++
|
||||
"""
|
||||
|
||||
-bpo_issue_re: Final[re.Pattern[str]] = re.compile(
|
||||
+bpo_issue_re: "Final[re.Pattern[str]]" = re.compile(
|
||||
"(?:issue #|bpo-)([0-9]+)", re.ASCII
|
||||
)
|
||||
-gh_issue_re: Final[re.Pattern[str]] = re.compile(
|
||||
+gh_issue_re: "Final[re.Pattern[str]]" = re.compile(
|
||||
"gh-(?:issue-)?([0-9]+)", re.ASCII | re.IGNORECASE
|
||||
)
|
||||
-whatsnew_re: Final[re.Pattern[str]] = re.compile(
|
||||
+whatsnew_re: "Final[re.Pattern[str]]" = re.compile(
|
||||
r"^what's new in (.*?)\??$", re.ASCII | re.IGNORECASE | re.MULTILINE
|
||||
)
|
||||
|
||||
@@ -42,7 +40,7 @@
|
||||
final_argument_whitespace = False
|
||||
option_spec = {}
|
||||
|
||||
- def run(self) -> list[Node]:
|
||||
+ def run(self) -> "list[Node]":
|
||||
# Get content of NEWS file
|
||||
source, _ = self.get_source_info()
|
||||
news_file = Path(source).resolve().parent / self.arguments[0]
|
||||
@@ -54,7 +52,7 @@
|
||||
return [nodes.strong(text, text)]
|
||||
|
||||
# remove first 3 lines as they are the main heading
|
||||
- news_text = news_text.removeprefix(BLURB_HEADER)
|
||||
+ news_text = news_text[len(BLURB_HEADER):] if news_text.startswith(BLURB_HEADER) else news_text
|
||||
|
||||
news_text = bpo_issue_re.sub(r":issue:`\1`", news_text)
|
||||
# Fallback handling for GitHub issues
|
||||
@@ -65,7 +63,7 @@
|
||||
return []
|
||||
|
||||
|
||||
-def setup(app: Sphinx) -> ExtensionMetadata:
|
||||
+def setup(app: "Sphinx") -> "ExtensionMetadata":
|
||||
app.add_directive("miscnews", MiscNews)
|
||||
|
||||
return {
|
||||
Index: Python-3.13.6/Doc/tools/extensions/patchlevel.py
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/tools/extensions/patchlevel.py 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/tools/extensions/patchlevel.py 2025-08-07 12:16:58.258716335 +0200
|
||||
@@ -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 @@
|
||||
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 @@
|
||||
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 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":
|
||||
Index: Python-3.13.6/Doc/tools/extensions/pydoc_topics.py
|
||||
===================================================================
|
||||
--- Python-3.13.6.orig/Doc/tools/extensions/pydoc_topics.py 2025-08-06 15:05:20.000000000 +0200
|
||||
+++ Python-3.13.6/Doc/tools/extensions/pydoc_topics.py 2025-08-07 12:16:58.258911962 +0200
|
||||
@@ -1,21 +1,23 @@
|
||||
"""Support for building "topic help" for pydoc."""
|
||||
|
||||
-from __future__ import annotations
|
||||
-
|
||||
from time import asctime
|
||||
-from typing import TYPE_CHECKING
|
||||
+from typing import TYPE_CHECKING, Tuple
|
||||
|
||||
from sphinx.builders.text import TextBuilder
|
||||
from sphinx.util import logging
|
||||
-from sphinx.util.display import status_iterator
|
||||
+try:
|
||||
+ from sphinx.util.display import status_iterator
|
||||
+except ModuleNotFoundError:
|
||||
+ from sphinx.util import status_iterator
|
||||
from sphinx.util.docutils import new_document
|
||||
from sphinx.writers.text import TextTranslator
|
||||
|
||||
-if TYPE_CHECKING:
|
||||
+try:
|
||||
+ from typing import Sequence, Set
|
||||
+except ModuleNotFoundError:
|
||||
from collections.abc import Sequence, Set
|
||||
|
||||
- from sphinx.application import Sphinx
|
||||
- from sphinx.util.typing import ExtensionMetadata
|
||||
+from sphinx.application import Sphinx
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -162,7 +164,7 @@
|
||||
self.outdir.joinpath("topics.py").write_text(topics, encoding="utf-8")
|
||||
|
||||
|
||||
-def _display_labels(item: tuple[str, Sequence[tuple[str, str]]]) -> str:
|
||||
+def _display_labels(item: Tuple[str, Sequence[Tuple[str, str]]]) -> str:
|
||||
_docname, label_ids = item
|
||||
labels = [name for name, _id in label_ids]
|
||||
if len(labels) > 4:
|
||||
@@ -170,7 +172,7 @@
|
||||
return ", ".join(labels)
|
||||
|
||||
|
||||
-def _repr(text: str, /) -> str:
|
||||
+def _repr(text: str) -> str:
|
||||
"""Return a triple-single-quoted representation of text."""
|
||||
if "'''" not in text:
|
||||
return f"r'''{text}'''"
|
||||
@@ -178,7 +180,7 @@
|
||||
return f"'''{text}'''"
|
||||
|
||||
|
||||
-def setup(app: Sphinx) -> ExtensionMetadata:
|
||||
+def setup(app: Sphinx) -> "ExtensionMetadata":
|
||||
app.add_builder(PydocTopicsBuilder)
|
||||
|
||||
return {
|
||||
32
fix-test-recursion-limit-15.6.patch
Normal file
32
fix-test-recursion-limit-15.6.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
Lib/test/test_compile.py | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/Lib/test/test_compile.py
|
||||
+++ b/Lib/test/test_compile.py
|
||||
@@ -21,6 +21,9 @@ from test.support import (script_helper,
|
||||
from test.support.bytecode_helper import instructions_with_positions
|
||||
from test.support.os_helper import FakePath
|
||||
|
||||
+IS_SLE_15_6 = os.environ.get("SLE_VERSION", "") == "0150700"
|
||||
+IS_32bit = hasattr(os, "uname") and os.uname().machine in ["i386", "i486", "i586", "i686"]
|
||||
+
|
||||
class TestSpecifics(unittest.TestCase):
|
||||
|
||||
def compile_single(self, source):
|
||||
@@ -117,6 +120,7 @@ class TestSpecifics(unittest.TestCase):
|
||||
self.assertEqual(d['z'], 12)
|
||||
|
||||
@unittest.skipIf(support.is_wasi, "exhausts limited stack on WASI")
|
||||
+ @unittest.skipIf(IS_SLE_15_6 and IS_32bit, "fails on 15.6 i586")
|
||||
def test_extended_arg(self):
|
||||
repeat = int(get_c_recursion_limit() * 0.9)
|
||||
longexpr = 'x = x or ' + '-x' * repeat
|
||||
@@ -701,6 +705,7 @@ class TestSpecifics(unittest.TestCase):
|
||||
|
||||
@support.cpython_only
|
||||
@unittest.skipIf(support.is_wasi, "exhausts limited stack on WASI")
|
||||
+ @unittest.skipIf(IS_SLE_15_6 and IS_32bit, "fails on 15.6 i586")
|
||||
def test_compiler_recursion_limit(self):
|
||||
# Expected limit is Py_C_RECURSION_LIMIT
|
||||
limit = get_c_recursion_limit()
|
||||
@@ -1,15 +0,0 @@
|
||||
---
|
||||
Misc/NEWS | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/Misc/NEWS
|
||||
+++ b/Misc/NEWS
|
||||
@@ -17608,7 +17608,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
|
||||
- :c:struct:`PyFrameObject` rather than ``_frame``. The non-existing entry
|
||||
+ :c:type:`PyFrameObject` rather than ``_frame``. The non-existing entry
|
||||
``_node`` no longer appears in the list.
|
||||
|
||||
- bpo-44378: :c:func:`Py_IS_TYPE` no longer uses :c:func:`Py_TYPE` to avoid
|
||||
95
gh126985-mv-pyvenv.cfg2getpath.patch
Normal file
95
gh126985-mv-pyvenv.cfg2getpath.patch
Normal 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.5/Lib/test/test_sysconfig.py
|
||||
===================================================================
|
||||
--- Python-3.13.5.orig/Lib/test/test_sysconfig.py 2025-06-12 19:55:42.184491497 +0200
|
||||
+++ Python-3.13.5/Lib/test/test_sysconfig.py 2025-06-12 19:56:05.737665419 +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'),
|
||||
@@ -1,647 +0,0 @@
|
||||
only in patch2:
|
||||
unchanged:
|
||||
---
|
||||
Doc/library/turtle.rst | 81 -------------------------------------------------
|
||||
1 file changed, 81 deletions(-)
|
||||
|
||||
Index: Python-3.13.0a3/Doc/library/turtle.rst
|
||||
===================================================================
|
||||
--- Python-3.13.0a3.orig/Doc/library/turtle.rst
|
||||
+++ Python-3.13.0a3/Doc/library/turtle.rst
|
||||
@@ -449,7 +449,6 @@ Turtle motion
|
||||
turtle is headed.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.position()
|
||||
(0.00,0.00)
|
||||
@@ -476,7 +475,6 @@ Turtle motion
|
||||
>>> turtle.goto(0, 0)
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.position()
|
||||
(0.00,0.00)
|
||||
@@ -495,13 +493,11 @@ Turtle motion
|
||||
orientation depends on the turtle mode, see :func:`mode`.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
:hide:
|
||||
|
||||
>>> turtle.setheading(22)
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.heading()
|
||||
22.0
|
||||
@@ -520,13 +516,11 @@ Turtle motion
|
||||
orientation depends on the turtle mode, see :func:`mode`.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
:hide:
|
||||
|
||||
>>> turtle.setheading(22)
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.heading()
|
||||
22.0
|
||||
@@ -549,13 +543,11 @@ Turtle motion
|
||||
not change the turtle's orientation.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
:hide:
|
||||
|
||||
>>> turtle.goto(0, 0)
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> tp = turtle.pos()
|
||||
>>> tp
|
||||
@@ -617,13 +609,11 @@ Turtle motion
|
||||
unchanged.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
:hide:
|
||||
|
||||
>>> turtle.goto(0, 240)
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.position()
|
||||
(0.00,240.00)
|
||||
@@ -639,13 +629,11 @@ Turtle motion
|
||||
Set the turtle's second coordinate to *y*, leave first coordinate unchanged.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
:hide:
|
||||
|
||||
>>> turtle.goto(0, 40)
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.position()
|
||||
(0.00,40.00)
|
||||
@@ -672,7 +660,6 @@ Turtle motion
|
||||
=================== ====================
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.setheading(90)
|
||||
>>> turtle.heading()
|
||||
@@ -685,14 +672,12 @@ Turtle motion
|
||||
its start-orientation (which depends on the mode, see :func:`mode`).
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
:hide:
|
||||
|
||||
>>> turtle.setheading(90)
|
||||
>>> turtle.goto(0, -10)
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.heading()
|
||||
90.0
|
||||
@@ -724,7 +709,6 @@ Turtle motion
|
||||
calculated automatically. May be used to draw regular polygons.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.home()
|
||||
>>> turtle.position()
|
||||
@@ -753,7 +737,6 @@ Turtle motion
|
||||
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.home()
|
||||
>>> turtle.dot()
|
||||
@@ -771,7 +754,6 @@ Turtle motion
|
||||
it by calling ``clearstamp(stamp_id)``.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.color("blue")
|
||||
>>> stamp_id = turtle.stamp()
|
||||
@@ -786,7 +768,6 @@ Turtle motion
|
||||
Delete stamp with given *stampid*.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.position()
|
||||
(150.00,-0.00)
|
||||
@@ -824,7 +805,6 @@ Turtle motion
|
||||
undo actions is determined by the size of the undobuffer.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> for i in range(4):
|
||||
... turtle.fd(50); turtle.lt(80)
|
||||
@@ -857,7 +837,6 @@ Turtle motion
|
||||
turtle turn instantly.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.speed()
|
||||
3
|
||||
@@ -878,7 +857,6 @@ Tell Turtle's state
|
||||
Return the turtle's current location (x,y) (as a :class:`Vec2D` vector).
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.pos()
|
||||
(440.00,-0.00)
|
||||
@@ -894,7 +872,6 @@ Tell Turtle's state
|
||||
orientation which depends on the mode - "standard"/"world" or "logo".
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.goto(10, 10)
|
||||
>>> turtle.towards(0,0)
|
||||
@@ -906,7 +883,6 @@ Tell Turtle's state
|
||||
Return the turtle's x coordinate.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.home()
|
||||
>>> turtle.left(50)
|
||||
@@ -922,7 +898,6 @@ Tell Turtle's state
|
||||
Return the turtle's y coordinate.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.home()
|
||||
>>> turtle.left(60)
|
||||
@@ -939,7 +914,6 @@ Tell Turtle's state
|
||||
:func:`mode`).
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.home()
|
||||
>>> turtle.left(67)
|
||||
@@ -956,7 +930,6 @@ Tell Turtle's state
|
||||
other turtle, in turtle step units.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.home()
|
||||
>>> turtle.distance(30,40)
|
||||
@@ -980,7 +953,6 @@ Settings for measurement
|
||||
Default value is 360 degrees.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.home()
|
||||
>>> turtle.left(90)
|
||||
@@ -1003,7 +975,6 @@ Settings for measurement
|
||||
``degrees(2*math.pi)``.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.home()
|
||||
>>> turtle.left(90)
|
||||
@@ -1014,7 +985,6 @@ Settings for measurement
|
||||
1.5707963267948966
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
:hide:
|
||||
|
||||
>>> turtle.degrees(360)
|
||||
@@ -1050,7 +1020,6 @@ Drawing state
|
||||
thickness. If no argument is given, the current pensize is returned.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.pensize()
|
||||
1
|
||||
@@ -1082,7 +1051,6 @@ Drawing state
|
||||
attributes in one statement.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
:options: +NORMALIZE_WHITESPACE
|
||||
|
||||
>>> turtle.pen(fillcolor="black", pencolor="red", pensize=10)
|
||||
@@ -1105,7 +1073,6 @@ Drawing state
|
||||
Return ``True`` if pen is down, ``False`` if it's up.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.penup()
|
||||
>>> turtle.isdown()
|
||||
@@ -1146,7 +1113,6 @@ Color control
|
||||
newly set pencolor.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> colormode()
|
||||
1.0
|
||||
@@ -1195,7 +1161,6 @@ Color control
|
||||
with the newly set fillcolor.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.fillcolor("violet")
|
||||
>>> turtle.fillcolor()
|
||||
@@ -1234,7 +1199,6 @@ Color control
|
||||
with the newly set colors.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.color("red", "green")
|
||||
>>> turtle.color()
|
||||
@@ -1251,7 +1215,6 @@ Filling
|
||||
~~~~~~~
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
:hide:
|
||||
|
||||
>>> turtle.home()
|
||||
@@ -1261,7 +1224,6 @@ Filling
|
||||
Return fillstate (``True`` if filling, ``False`` else).
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.begin_fill()
|
||||
>>> if turtle.filling():
|
||||
@@ -1286,7 +1248,6 @@ Filling
|
||||
above may be either all yellow or have some white regions.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.color("black", "red")
|
||||
>>> turtle.begin_fill()
|
||||
@@ -1303,7 +1264,6 @@ More drawing control
|
||||
variables to the default values.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.goto(0,-22)
|
||||
>>> turtle.left(100)
|
||||
@@ -1354,7 +1314,6 @@ Visibility
|
||||
drawing observably.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.hideturtle()
|
||||
|
||||
@@ -1365,7 +1324,6 @@ Visibility
|
||||
Make the turtle visible.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.showturtle()
|
||||
|
||||
@@ -1396,7 +1354,6 @@ Appearance
|
||||
deal with shapes see Screen method :func:`register_shape`.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.shape()
|
||||
'classic'
|
||||
@@ -1422,7 +1379,6 @@ Appearance
|
||||
``resizemode("user")`` is called by :func:`shapesize` when used with arguments.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.resizemode()
|
||||
'noresize'
|
||||
@@ -1446,7 +1402,6 @@ Appearance
|
||||
of the shape's outline.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.shapesize()
|
||||
(1.0, 1.0, 1)
|
||||
@@ -1471,7 +1426,6 @@ Appearance
|
||||
heading of the turtle are sheared.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.shape("circle")
|
||||
>>> turtle.shapesize(5,2)
|
||||
@@ -1488,7 +1442,6 @@ Appearance
|
||||
change the turtle's heading (direction of movement).
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.reset()
|
||||
>>> turtle.shape("circle")
|
||||
@@ -1512,7 +1465,6 @@ Appearance
|
||||
turtle (its direction of movement).
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.reset()
|
||||
>>> turtle.shape("circle")
|
||||
@@ -1541,7 +1493,6 @@ Appearance
|
||||
given matrix.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle = Turtle()
|
||||
>>> turtle.shape("square")
|
||||
@@ -1557,7 +1508,6 @@ Appearance
|
||||
can be used to define a new shape or components of a compound shape.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.shape("square")
|
||||
>>> turtle.shapetransform(4, -1, 0, 2)
|
||||
@@ -1582,7 +1532,6 @@ Using events
|
||||
procedural way:
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> def turn(x, y):
|
||||
... left(180)
|
||||
@@ -1603,7 +1552,6 @@ Using events
|
||||
``None``, existing bindings are removed.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> class MyTurtle(Turtle):
|
||||
... def glow(self,x,y):
|
||||
@@ -1631,7 +1579,6 @@ Using events
|
||||
mouse-click event on that turtle.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.ondrag(turtle.goto)
|
||||
|
||||
@@ -1659,7 +1606,6 @@ Special Turtle methods
|
||||
Return the last recorded polygon.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.home()
|
||||
>>> turtle.begin_poly()
|
||||
@@ -1679,7 +1625,6 @@ Special Turtle methods
|
||||
turtle properties.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> mick = Turtle()
|
||||
>>> joe = mick.clone()
|
||||
@@ -1692,7 +1637,6 @@ Special Turtle methods
|
||||
return the "anonymous turtle":
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> pet = getturtle()
|
||||
>>> pet.fd(50)
|
||||
@@ -1706,7 +1650,6 @@ Special Turtle methods
|
||||
TurtleScreen methods can then be called for that object.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> ts = turtle.getscreen()
|
||||
>>> ts
|
||||
@@ -1724,7 +1667,6 @@ Special Turtle methods
|
||||
``None``, the undobuffer is disabled.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> turtle.setundobuffer(42)
|
||||
|
||||
@@ -1734,7 +1676,6 @@ Special Turtle methods
|
||||
Return number of entries in the undobuffer.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> while undobufferentries():
|
||||
... undo()
|
||||
@@ -1757,7 +1698,6 @@ below:
|
||||
For example:
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> s = Shape("compound")
|
||||
>>> poly1 = ((0,0),(10,-5),(0,10),(-10,-5))
|
||||
@@ -1768,7 +1708,6 @@ below:
|
||||
3. Now add the Shape to the Screen's shapelist and use it:
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> register_shape("myshape", s)
|
||||
>>> shape("myshape")
|
||||
@@ -1788,7 +1727,6 @@ Most of the examples in this section ref
|
||||
``screen``.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
:hide:
|
||||
|
||||
>>> screen = Screen()
|
||||
@@ -1805,7 +1743,6 @@ Window control
|
||||
Set or return background color of the TurtleScreen.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> screen.bgcolor("orange")
|
||||
>>> screen.bgcolor()
|
||||
@@ -1897,7 +1834,6 @@ Window control
|
||||
distorted.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> screen.reset()
|
||||
>>> screen.setworldcoordinates(-50,-7.5,50,7.5)
|
||||
@@ -1908,7 +1844,6 @@ Window control
|
||||
... left(45); fd(2) # a regular octagon
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
:hide:
|
||||
|
||||
>>> screen.reset()
|
||||
@@ -1930,7 +1865,6 @@ Animation control
|
||||
Optional argument:
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> screen.delay()
|
||||
10
|
||||
@@ -1952,7 +1886,6 @@ Animation control
|
||||
:func:`delay`).
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> screen.tracer(8, 25)
|
||||
>>> dist = 2
|
||||
@@ -1989,7 +1922,6 @@ Using screen events
|
||||
must have the focus. (See method :func:`listen`.)
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> def f():
|
||||
... fd(50)
|
||||
@@ -2010,7 +1942,6 @@ Using screen events
|
||||
must have focus. (See method :func:`listen`.)
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> def f():
|
||||
... fd(50)
|
||||
@@ -2035,7 +1966,6 @@ Using screen events
|
||||
named ``turtle``:
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> screen.onclick(turtle.goto) # Subsequently clicking into the TurtleScreen will
|
||||
>>> # make the turtle move to the clicked point.
|
||||
@@ -2055,7 +1985,6 @@ Using screen events
|
||||
Install a timer that calls *fun* after *t* milliseconds.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> running = True
|
||||
>>> def f():
|
||||
@@ -2137,7 +2066,6 @@ Settings and special methods
|
||||
============ ========================= ===================
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> mode("logo") # resets turtle heading to north
|
||||
>>> mode()
|
||||
@@ -2152,7 +2080,6 @@ Settings and special methods
|
||||
values of color triples have to be in the range 0..*cmode*.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> screen.colormode(1)
|
||||
>>> turtle.pencolor(240, 160, 80)
|
||||
@@ -2173,7 +2100,6 @@ Settings and special methods
|
||||
do with a Tkinter Canvas.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> cv = screen.getcanvas()
|
||||
>>> cv
|
||||
@@ -2185,7 +2111,6 @@ Settings and special methods
|
||||
Return a list of names of all currently available turtle shapes.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> screen.getshapes()
|
||||
['arrow', 'blank', 'circle', ..., 'turtle']
|
||||
@@ -2209,7 +2134,6 @@ Settings and special methods
|
||||
coordinates: Install the corresponding polygon shape.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> screen.register_shape("triangle", ((5,-3), (0,5), (-5,-3)))
|
||||
|
||||
@@ -2225,7 +2149,6 @@ Settings and special methods
|
||||
Return the list of turtles on the screen.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> for turtle in screen.turtles():
|
||||
... turtle.color("red")
|
||||
@@ -2287,7 +2210,6 @@ Methods specific to Screen, not inherite
|
||||
center window vertically
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> screen.setup (width=200, height=200, startx=0, starty=0)
|
||||
>>> # sets window to 200x200 pixels, in upper left of screen
|
||||
@@ -2303,7 +2225,6 @@ Methods specific to Screen, not inherite
|
||||
Set title of turtle window to *titlestring*.
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> screen.title("Welcome to the turtle zoo!")
|
||||
|
||||
@@ -2374,7 +2295,6 @@ Public classes
|
||||
Example:
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
|
||||
>>> poly = ((0,0),(10,-5),(0,10),(-10,-5))
|
||||
>>> s = Shape("compound")
|
||||
@@ -2759,7 +2679,6 @@ Changes since Python 3.0
|
||||
|
||||
|
||||
.. doctest::
|
||||
- :skipif: _tkinter is None
|
||||
:hide:
|
||||
|
||||
>>> for turtle in turtles():
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -1664,11 +1664,18 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
|
||||
@@ -1684,11 +1684,18 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
|
||||
$(DTRACE_OBJS) \
|
||||
$(srcdir)/Modules/getbuildinfo.c
|
||||
$(CC) -c $(PY_CORE_CFLAGS) \
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
Index: Python-3.13.0a3/Lib/site.py
|
||||
===================================================================
|
||||
--- Python-3.13.0a3.orig/Lib/site.py
|
||||
+++ Python-3.13.0a3/Lib/site.py
|
||||
@@ -77,7 +77,7 @@ import io
|
||||
import stat
|
||||
---
|
||||
Lib/site.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/Lib/site.py
|
||||
+++ b/Lib/site.py
|
||||
@@ -78,7 +78,7 @@ import stat
|
||||
import errno
|
||||
|
||||
# Prefixes for site-packages; add additional prefixes like /usr/local here
|
||||
-PREFIXES = [sys.prefix, sys.exec_prefix]
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
---
|
||||
Lib/test/test_posix.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: Python-3.13.0a3/Lib/test/test_posix.py
|
||||
===================================================================
|
||||
--- Python-3.13.0a3.orig/Lib/test/test_posix.py
|
||||
+++ Python-3.13.0a3/Lib/test/test_posix.py
|
||||
@@ -433,7 +433,7 @@ class PosixTester(unittest.TestCase):
|
||||
def test_posix_fadvise(self):
|
||||
fd = os.open(os_helper.TESTFN, os.O_RDONLY)
|
||||
try:
|
||||
- posix.posix_fadvise(fd, 0, 0, posix.POSIX_FADV_WILLNEED)
|
||||
+ posix.posix_fadvise(fd, 0, 0, posix.POSIX_FADV_RANDOM)
|
||||
finally:
|
||||
os.close(fd)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
addFilter("pem-certificate.*/usr/lib.*/python.*/test/*.pem")
|
||||
addFilter("devel-file-in-non-devel-package.*/usr/lib.*/python.*/tests/*.c")
|
||||
addFilter("devel-file-in-non-devel-package.*/usr/lib.*/python.*/test/*.c")
|
||||
addFilter("devel-file-in-non-devel-package.*/usr/lib.*/python.*/test/*.cpp")
|
||||
|
||||
2405
python313.changes
2405
python313.changes
File diff suppressed because it is too large
Load Diff
264
python313.spec
264
python313.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python313
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -22,35 +22,83 @@
|
||||
%bcond_without doc
|
||||
%bcond_with base
|
||||
%bcond_with general
|
||||
%bcond_without GIL
|
||||
%endif
|
||||
%if "%{flavor}" == "base"
|
||||
%define psuffix -core
|
||||
%bcond_with doc
|
||||
%bcond_without base
|
||||
%bcond_with general
|
||||
%bcond_without GIL
|
||||
%endif
|
||||
%if "%{flavor}" == ""
|
||||
%define psuffix %{nil}
|
||||
%bcond_with doc
|
||||
%bcond_with base
|
||||
%bcond_without general
|
||||
%bcond_without GIL
|
||||
%endif
|
||||
|
||||
# Currently supported architectures
|
||||
# https://peps.python.org/pep-0744/#support
|
||||
%ifarch %{x86_64} aarch64
|
||||
%bcond_without experimental_jit
|
||||
%if "%{flavor}" == "nogil"
|
||||
%define psuffix %{nil}
|
||||
%bcond_with doc
|
||||
%bcond_with base
|
||||
%bcond_without general
|
||||
%bcond_with GIL
|
||||
%endif
|
||||
%if "%{flavor}" == "nogil-base"
|
||||
%define psuffix -nogil-core
|
||||
%bcond_with doc
|
||||
%bcond_without base
|
||||
%bcond_with general
|
||||
%bcond_with GIL
|
||||
%endif
|
||||
|
||||
%if 0%{?do_profiling} && !0%{?want_reproducible_builds}
|
||||
%bcond_without profileopt
|
||||
%else
|
||||
%bcond_with experimental_jit
|
||||
%bcond_with profileopt
|
||||
%endif
|
||||
|
||||
# Only for Tumbleweed
|
||||
# https://en.opensuse.org/openSUSE:Python:Externally_managed
|
||||
%if 0%{?suse_version} > 1600
|
||||
%bcond_without externally_managed
|
||||
%else
|
||||
%bcond_with externally_managed
|
||||
%endif
|
||||
|
||||
%define python_pkg_name python313
|
||||
%if %{without GIL}
|
||||
%define python_pkg_name python313-nogil
|
||||
%define base_pkg_name python313
|
||||
%endif
|
||||
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%define primary_interpreter 1
|
||||
%else
|
||||
%define primary_interpreter 0
|
||||
%endif
|
||||
|
||||
# No experimental_jit in SLES, there's no clang >=18
|
||||
%if 0%{?suse_version} <= 1600
|
||||
%bcond_with experimental_jit
|
||||
%else
|
||||
# Disable experimental_jit for primary python.
|
||||
# llvm is not part of ring0 and experimental_jit requires clang >= 18
|
||||
%if !%{primary_interpreter}
|
||||
# Currently supported architectures
|
||||
# https://peps.python.org/pep-0744/#support
|
||||
%ifarch x86_64 %{x86_64} aarch64
|
||||
%bcond_without experimental_jit
|
||||
%else
|
||||
%bcond_with experimental_jit
|
||||
%endif
|
||||
%else
|
||||
%bcond_with experimental_jit
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# %%if 0%%{?sle_version} && 0%%{?suse_version} < 1550
|
||||
# Obsoleting previous "latest" Python versions
|
||||
# Next versions will get more lines like for older versions
|
||||
@@ -77,10 +125,14 @@
|
||||
# %%define tarversion %%{version}
|
||||
# %%endif
|
||||
# We don't process beta signs well
|
||||
%define folderversion 3.13.0
|
||||
%define folderversion %{version}
|
||||
%define sitedir %{_libdir}/python%{python_version}
|
||||
# three possible ABI kinds: m - pymalloc, d - debug build; see PEP 3149
|
||||
%define abi_kind %{nil}
|
||||
%if %{without GIL}
|
||||
%define abi_kind t
|
||||
%define sitedir %{_libdir}/python%{python_version}%{abi_kind}
|
||||
%endif
|
||||
# python ABI version - used in some file names
|
||||
%define python_abi %{python_version}%{abi_kind}
|
||||
# soname ABI tag defined in PEP 3149
|
||||
@@ -88,7 +140,11 @@
|
||||
# version part of "libpython" package
|
||||
%define so_major 1
|
||||
%define so_minor 0
|
||||
%if "%{abi_kind}" == "t"
|
||||
%define so_version %{python_version_soname}t%{so_major}_%{so_minor}
|
||||
%else
|
||||
%define so_version %{python_version_soname}%{abi_kind}-%{so_major}_%{so_minor}
|
||||
%endif
|
||||
# rpm and python have different ideas about what is an arch-dependent name, so:
|
||||
%if "%{__isa_name}" == "ppc"
|
||||
%define archname %(echo %{_arch} | sed s/ppc/powerpc/)
|
||||
@@ -110,17 +166,16 @@
|
||||
# pyexpat.cpython-35m-armv7-linux-gnueabihf
|
||||
# _md5.cpython-38m-x86_64-linux-gnu.so
|
||||
%define dynlib() %{sitedir}/lib-dynload/%{1}.cpython-%{abi_tag}-%{archname}-%{_os}%{?_gnu}%{?armsuffix}.so
|
||||
%bcond_without profileopt
|
||||
Name: %{python_pkg_name}%{psuffix}
|
||||
Version: 3.13.0~b3
|
||||
%define tarversion 3.13.0b3
|
||||
Version: 3.13.7
|
||||
%define tarversion %{version}
|
||||
%define tarname Python-%{tarversion}
|
||||
Release: 0
|
||||
Summary: Python 3 Interpreter
|
||||
License: Python-2.0
|
||||
URL: https://www.python.org/
|
||||
Source0: https://www.python.org/ftp/python/%{folderversion}/%{tarname}.tar.xz
|
||||
Source1: https://www.python.org/ftp/python/%{folderversion}/%{tarname}.tar.xz.asc
|
||||
Source1: https://www.python.org/ftp/python/%{folderversion}/%{tarname}.tar.xz.sigstore
|
||||
Source2: baselibs.conf
|
||||
Source3: README.SUSE
|
||||
Source4: externally_managed.in
|
||||
@@ -156,22 +211,26 @@ Patch02: F00251-change-user-install-location.patch
|
||||
Patch03: python-3.3.0b1-localpath.patch
|
||||
# replace DATE, TIME and COMPILER by fixed definitions to aid reproducible builds
|
||||
Patch04: python-3.3.0b1-fix_date_time_compiler.patch
|
||||
# POSIX_FADV_WILLNEED throws EINVAL. Use a different constant in test
|
||||
Patch05: python-3.3.0b1-test-posix_fadvise.patch
|
||||
# Raise timeout value for test_subprocess
|
||||
Patch06: subprocess-raise-timeout.patch
|
||||
# PATCH-FEATURE-UPSTREAM bpo-31046_ensurepip_honours_prefix.patch bpo#31046 mcepl@suse.com
|
||||
# ensurepip should honour the value of $(prefix)
|
||||
Patch07: bpo-31046_ensurepip_honours_prefix.patch
|
||||
# PATCH-FIX-SLE no-skipif-doctests.patch jsc#SLE-13738 mcepl@suse.com
|
||||
# SLE-15 version of Sphinx doesn't know about skipif directive in doctests.
|
||||
Patch08: no-skipif-doctests.patch
|
||||
# PATCH-FIX-SLE skip-test_pyobject_freed_is_freed.patch mcepl@suse.com
|
||||
# skip a test failing on SLE-15
|
||||
Patch09: skip-test_pyobject_freed_is_freed.patch
|
||||
# PATCH-FIX-SLE fix_configure_rst.patch bpo#43774 mcepl@suse.com
|
||||
# remove duplicate link targets and make documentation with old Sphinx in SLE
|
||||
Patch10: fix_configure_rst.patch
|
||||
# PATCH-FIX-OPENSUSE fix-test-recursion-limit-15.6.patch gh#python/cpython#115083
|
||||
# Skip some failing tests in test_compile for i586 arch in 15.6.
|
||||
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 bsc1243155-sphinx-non-determinism.patch bsc#1243155 mcepl@suse.com
|
||||
# Doc: Generate ids for audit_events using docname
|
||||
Patch43: bsc1243155-sphinx-non-determinism.patch
|
||||
BuildRequires: autoconf-archive
|
||||
BuildRequires: automake
|
||||
BuildRequires: fdupes
|
||||
@@ -199,15 +258,31 @@ BuildRequires: pkgconfig(libtirpc)
|
||||
BuildRequires: mpdecimal-devel
|
||||
%endif
|
||||
%if %{with doc}
|
||||
|
||||
%if 0%{?sle_version} >= 150700 && !0%{?is_opensuse}
|
||||
BuildRequires: python311-Sphinx
|
||||
BuildRequires: python311-python-docs-theme
|
||||
%else
|
||||
BuildRequires: python3-Sphinx >= 4.0.0
|
||||
%if 0%{?suse_version} >= 1500
|
||||
BuildRequires: python3-python-docs-theme >= 2022.1
|
||||
%endif
|
||||
%if 0%{?suse_version} < 1599
|
||||
BuildRequires: python3-dataclasses
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
# end of {with doc}
|
||||
|
||||
%if %{with experimental_jit}
|
||||
# needed for experimental_jit
|
||||
BuildRequires: clang >= 18
|
||||
BuildRequires: llvm >= 18
|
||||
%endif
|
||||
|
||||
# needed for experimental_jit
|
||||
BuildRequires: clang => 18
|
||||
BuildRequires: llvm => 18
|
||||
%if %{without GIL}
|
||||
ExcludeArch: aarch64
|
||||
%endif
|
||||
|
||||
%if %{with general}
|
||||
# required for idle3 (.desktop and .appdata.xml files)
|
||||
@@ -218,7 +293,6 @@ BuildRequires: gettext
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: sqlite-devel
|
||||
BuildRequires: timezone
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: pkgconfig(ncurses)
|
||||
BuildRequires: pkgconfig(tk)
|
||||
BuildRequires: pkgconfig(x11)
|
||||
@@ -250,6 +324,12 @@ Installing "python3" is sufficient for the vast majority of usecases.
|
||||
In addition, recommended packages provide UI toolkit support (python3-curses,
|
||||
python3-tk), legacy UNIX database bindings (python3-dbm), and the IDLE
|
||||
development environment (python3-idle).
|
||||
%if %{without GIL}
|
||||
|
||||
This package has been built with the Global Interpreter Lock removed.
|
||||
This feature is still considered to be experimental. This package is
|
||||
not ready to be used in production environments.
|
||||
%endif
|
||||
|
||||
%package -n %{python_pkg_name}-tk
|
||||
Summary: TkInter, a Python Tk Interface
|
||||
@@ -365,6 +445,12 @@ This package contains the interpreter core and most commonly used modules
|
||||
from the standard library. This is sufficient for many usecases, but it
|
||||
excludes components that depend on external libraries, most notably XML,
|
||||
database and UI toolkits support.
|
||||
%if %{without GIL}
|
||||
|
||||
This package has been built with the Global Interpreter Lock removed.
|
||||
This feature is still considered to be experimental. This package is
|
||||
not ready to be used in production environments.
|
||||
%endif
|
||||
|
||||
%package -n %{python_pkg_name}-tools
|
||||
Summary: Python Utility and Demonstration Scripts
|
||||
@@ -428,13 +514,7 @@ This package contains libpython3.2 shared library for embedding in
|
||||
other applications.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -N -n %{tarname}
|
||||
%autopatch -p1 -M 07
|
||||
|
||||
%if 0%{?suse_version} <= 1500
|
||||
%patch -P 08 -p1
|
||||
%endif
|
||||
%autopatch -p1 -m 09
|
||||
%autosetup -p1 -n %{tarname}
|
||||
|
||||
# Fix devhelp doc build gh#python/cpython#120150
|
||||
echo "master_doc = 'contents'" >> Doc/conf.py
|
||||
@@ -442,6 +522,8 @@ echo "master_doc = 'contents'" >> Doc/conf.py
|
||||
# drop Autoconf version requirement
|
||||
sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac
|
||||
|
||||
sed -i "s/_LLVM_VERSION = .*/_LLVM_VERSION = $(realpath /usr/bin/clang | awk -F- '{print $2}')/g" ./Tools/jit/_llvm.py
|
||||
|
||||
%if %{primary_interpreter}
|
||||
# fix shebangs - convert /usr/local/bin/python and /usr/bin/env/python to /usr/bin/python3
|
||||
for dir in Lib Tools; do
|
||||
@@ -462,7 +544,7 @@ sed -i -e '/Breakpoint 3 at ...pdb.py:97/s/97/96/' Lib/test/test_pdb.py
|
||||
%endif
|
||||
|
||||
# Cannot remove it because of gh#python/cpython#92875
|
||||
# rm -r Modules/expat
|
||||
rm -r Modules/expat
|
||||
|
||||
# drop duplicate README from site-packages
|
||||
rm Lib/site-packages/README.txt
|
||||
@@ -474,13 +556,16 @@ tar xvf %{SOURCE21}
|
||||
# sed -i -e '/^SPHINXERRORHANDLING/s/-W//' Doc/Makefile
|
||||
|
||||
%build
|
||||
export SUSE_VERSION="0%{?suse_version}"
|
||||
export SLE_VERSION="0%{?sle_version}"
|
||||
|
||||
%if %{with doc}
|
||||
TODAY_DATE=`date -r %{SOURCE0} "+%%B %%d, %%Y"`
|
||||
# TODO use not date of tarball but date of latest patch
|
||||
|
||||
cd Doc
|
||||
sed -i "s/^today = .*/today = '$TODAY_DATE'/" conf.py
|
||||
%make_build -j1 html
|
||||
%make_build -j1 JOBS=1 html
|
||||
|
||||
# Build also devhelp files
|
||||
sphinx-build -a -b devhelp . build/devhelp
|
||||
@@ -520,6 +605,9 @@ export CFLAGS="%{optflags} -IVendor/"
|
||||
%endif
|
||||
%if %{with experimental_jit}
|
||||
--enable-experimental-jit=yes-off \
|
||||
%endif
|
||||
%if %{without GIL}
|
||||
--disable-gil \
|
||||
%endif
|
||||
--enable-loadable-sqlite-extensions
|
||||
|
||||
@@ -529,7 +617,6 @@ export CFLAGS="%{optflags} -IVendor/"
|
||||
# Objects/typeslots.inc \
|
||||
# Python/opcode_targets.h \
|
||||
# Include/opcode.h
|
||||
%make_build
|
||||
|
||||
%if %{with general}
|
||||
%make_build
|
||||
@@ -546,6 +633,8 @@ LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH \
|
||||
%endif
|
||||
|
||||
%check
|
||||
export SUSE_VERSION="0%{?suse_version}"
|
||||
export SLE_VERSION="0%{?sle_version}"
|
||||
%if %{with general}
|
||||
# exclude test_gdb -- it doesn't run in buildservice anyway, and fails on missing debuginfos
|
||||
# when you install gdb into your test env
|
||||
@@ -563,7 +652,14 @@ EXCLUDE="$EXCLUDE test_faulthandler"
|
||||
%endif
|
||||
# some tests break in QEMU
|
||||
%if 0%{?qemu_user_space_build}
|
||||
EXCLUDE="$EXCLUDE test_faulthandler test_multiprocessing_forkserver test_multiprocessing_spawn test_os test_posix test_signal test_socket test_subprocess"
|
||||
# test_external_inspection: qemu does not support ptrace in test_self_trace
|
||||
# test_faulthandler: test_register_chain is racy
|
||||
# test_os: test_fork_warns_when_non_python_thread_exists fails
|
||||
# test_posix: qemu does not support fexecve with O_CLOEXEC in test_fexecve
|
||||
# test_signal: qemu crashes in test_stress_modifying_handlers
|
||||
# test_socket: many CmsgTrunc tests fail
|
||||
# test_subprocess: qemu does not support CLONE_VFORK
|
||||
EXCLUDE="$EXCLUDE test_external_inspection test_faulthandler test_os test_posix test_signal test_socket test_subprocess"
|
||||
%endif
|
||||
|
||||
# This test (part of test_uuid) requires real network interfaces
|
||||
@@ -571,12 +667,6 @@ EXCLUDE="$EXCLUDE test_faulthandler test_multiprocessing_forkserver test_multipr
|
||||
# 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 || :
|
||||
@@ -657,37 +747,40 @@ done
|
||||
|
||||
# Idle is not packaged in base due to the appstream-glib dependency
|
||||
# move idle config into /etc
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/idle%{python_version}
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/idle%{python_abi}
|
||||
(
|
||||
cd %{buildroot}/%{sitedir}/idlelib/
|
||||
for file in *.def ; do
|
||||
mv $file %{buildroot}%{_sysconfdir}/idle%{python_version}/
|
||||
ln -sf %{_sysconfdir}/idle%{python_version}/$file %{buildroot}/%{sitedir}/idlelib/
|
||||
mv $file %{buildroot}%{_sysconfdir}/idle%{python_abi}/
|
||||
ln -sf %{_sysconfdir}/idle%{python_abi}/$file %{buildroot}/%{sitedir}/idlelib/
|
||||
done
|
||||
)
|
||||
|
||||
# keep just idle3.X
|
||||
ls -l %{buildroot}%{_bindir}/
|
||||
rm %{buildroot}%{_bindir}/idle3
|
||||
|
||||
# mve idle binary to idle3.13t to avoid conflict
|
||||
%if %{without GIL}
|
||||
mv %{buildroot}%{_bindir}/idle%{python_version} %{buildroot}%{_bindir}/idle%{python_abi}
|
||||
%endif
|
||||
|
||||
# install idle icons
|
||||
for size in 16 32 48 ; do
|
||||
install -m 644 -D Lib/idlelib/Icons/idle_${size}.png \
|
||||
%{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/idle%{python_version}.png
|
||||
%{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/idle%{python_abi}.png
|
||||
done
|
||||
|
||||
# install idle desktop file
|
||||
cp %{SOURCE19} idle%{python_version}.desktop
|
||||
sed -i -e 's:idle3:idle%{python_version}:g' idle%{python_version}.desktop
|
||||
install -m 644 -D -t %{buildroot}%{_datadir}/applications idle%{python_version}.desktop
|
||||
%suse_update_desktop_file idle%{python_version}
|
||||
cp %{SOURCE19} idle%{python_abi}.desktop
|
||||
sed -i -e 's:idle3:idle%{python_abi}:g' idle%{python_abi}.desktop
|
||||
install -m 644 -D -t %{buildroot}%{_datadir}/applications idle%{python_abi}.desktop
|
||||
|
||||
cp %{SOURCE20} idle%{python_version}.appdata.xml
|
||||
sed -i -e 's:idle3.desktop:idle%{python_version}.desktop:g' idle%{python_version}.appdata.xml
|
||||
install -m 644 -D -t %{buildroot}%{_datadir}/metainfo idle%{python_version}.appdata.xml
|
||||
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/idle%{python_version}.appdata.xml
|
||||
cp %{SOURCE20} idle%{python_abi}.appdata.xml
|
||||
sed -i -e 's:idle3.desktop:idle%{python_abi}.desktop:g' idle%{python_abi}.appdata.xml
|
||||
install -m 644 -D -t %{buildroot}%{_datadir}/metainfo idle%{python_abi}.appdata.xml
|
||||
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/idle%{python_abi}.appdata.xml
|
||||
|
||||
%fdupes %{buildroot}/%{_libdir}/python%{python_version}
|
||||
%fdupes %{buildroot}/%{_libdir}/python%{python_abi}
|
||||
%endif
|
||||
%if %{with base}
|
||||
%make_install
|
||||
@@ -699,7 +792,7 @@ find %{buildroot} -name "*.a" -delete
|
||||
install -d -m 755 %{buildroot}%{sitedir}/site-packages
|
||||
install -d -m 755 %{buildroot}%{sitedir}/site-packages/__pycache__
|
||||
# and their 32bit counterparts explicitly
|
||||
mkdir -p %{buildroot}%{_prefix}/lib/python%{python_version}/site-packages/__pycache__
|
||||
mkdir -p %{buildroot}%{_prefix}/lib/python%{python_abi}/site-packages/__pycache__
|
||||
|
||||
# cleanup parts that don't belong
|
||||
for dir in curses dbm sqlite3 tkinter idlelib; do
|
||||
@@ -721,13 +814,13 @@ rm %{buildroot}%{_libdir}/libpython3.so
|
||||
rm %{buildroot}%{_libdir}/pkgconfig/{python3,python3-embed}.pc
|
||||
%endif
|
||||
|
||||
%if %{suse_version} > 1550
|
||||
%if %{with externally_managed}
|
||||
# PEP-0668 mark this as a distro maintained python
|
||||
sed -e 's,__PYTHONPREFIX__,%{python_pkg_name},' -e 's,__PYTHON__,python%{python_version},' < %{SOURCE4} > %{buildroot}%{sitedir}/EXTERNALLY-MANAGED
|
||||
%endif
|
||||
|
||||
# link shared library instead of static library that tools expect
|
||||
ln -s ../../libpython%{python_abi}.so %{buildroot}%{_libdir}/python%{python_version}/config-%{python_abi}-%{archname}-%{_os}%{?_gnu}%{?armsuffix}/libpython%{python_abi}.so
|
||||
ln -s ../../libpython%{python_abi}.so %{buildroot}%{_libdir}/python%{python_abi}/config-%{python_abi}-%{archname}-%{_os}%{?_gnu}%{?armsuffix}/libpython%{python_abi}.so
|
||||
|
||||
# delete idle3, which has to many packaging dependencies for base
|
||||
rm %{buildroot}%{_bindir}/idle3*
|
||||
@@ -757,6 +850,9 @@ install -m 755 -D Tools/gdb/libpython.py %{buildroot}%{_datadir}/gdb/auto-load/%
|
||||
# install devel files to /config
|
||||
#cp Makefile Makefile.pre.in Makefile.pre $RPM_BUILD_ROOT%{sitedir}/config-%{python_abi}/
|
||||
|
||||
# Remove -IVendor/ from python-config boo#1231795
|
||||
sed -i 's/-IVendor\///' %{buildroot}%{_bindir}/python%{python_abi}-config
|
||||
|
||||
# RPM macros
|
||||
%if %{primary_interpreter}
|
||||
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/
|
||||
@@ -783,8 +879,24 @@ LD_LIBRARY_PATH=. ./python -O -c "from py_compile import compile; compile('$FAIL
|
||||
done < %{SOURCE9}
|
||||
)
|
||||
echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-import-failed-hooks.pth
|
||||
|
||||
# not packaged without GIL
|
||||
%if %{without GIL}
|
||||
rm -rf %{buildroot}%{_libdir}/pkgconfig/python-%{python_version}.pc
|
||||
rm -rf %{buildroot}%{_libdir}/pkgconfig/python-%{python_version}-embed.pc
|
||||
rm %{buildroot}%{_bindir}/python%{python_version}
|
||||
rm %{buildroot}%{_bindir}/pydoc%{python_version}
|
||||
rm %{buildroot}%{_bindir}/python%{python_version}-config
|
||||
rm %{buildroot}%{_mandir}/man1/python%{python_version}.1*
|
||||
%endif
|
||||
|
||||
%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
|
||||
|
||||
%if %{with general}
|
||||
%files -n %{python_pkg_name}-tk
|
||||
%{sitedir}/tkinter
|
||||
@@ -793,6 +905,7 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo
|
||||
%files -n %{python_pkg_name}-curses
|
||||
%{sitedir}/curses
|
||||
%{dynlib _curses}
|
||||
%{dynlib _curses_panel}
|
||||
|
||||
%files -n %{python_pkg_name}-dbm
|
||||
%{sitedir}/dbm
|
||||
@@ -808,21 +921,22 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo
|
||||
|
||||
%files -n %{python_pkg_name}-idle
|
||||
%{sitedir}/idlelib
|
||||
%dir %{_sysconfdir}/idle%{python_version}
|
||||
%config %{_sysconfdir}/idle%{python_version}/*
|
||||
%dir %{_sysconfdir}/idle%{python_abi}
|
||||
%config %{_sysconfdir}/idle%{python_abi}/*
|
||||
%doc Lib/idlelib/README.txt
|
||||
%doc Lib/idlelib/TODO.txt
|
||||
%doc Lib/idlelib/extend.txt
|
||||
%doc Lib/idlelib/ChangeLog
|
||||
%{_bindir}/idle%{python_version}
|
||||
%{_datadir}/applications/idle%{python_version}.desktop
|
||||
%{_datadir}/metainfo/idle%{python_version}.appdata.xml
|
||||
%{_datadir}/icons/hicolor/*/apps/idle%{python_version}.png
|
||||
%{_bindir}/idle%{python_abi}
|
||||
%{_datadir}/applications/idle%{python_abi}.desktop
|
||||
%{_datadir}/metainfo/idle%{python_abi}.appdata.xml
|
||||
%{_datadir}/icons/hicolor/*/apps/idle%{python_abi}.png
|
||||
%dir %{_datadir}/icons/hicolor
|
||||
%dir %{_datadir}/icons/hicolor/16x16
|
||||
%dir %{_datadir}/icons/hicolor/32x32
|
||||
%dir %{_datadir}/icons/hicolor/48x48
|
||||
%dir %{_datadir}/icons/hicolor/*/apps
|
||||
|
||||
# endif for if general
|
||||
%endif
|
||||
|
||||
@@ -897,8 +1011,12 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo
|
||||
%if %{primary_interpreter}
|
||||
%{_mandir}/man1/python3.1%{?ext_man}
|
||||
%endif
|
||||
|
||||
%if %{with GIL}
|
||||
%{_mandir}/man1/python%{python_version}.1%{?ext_man}
|
||||
%if %{suse_version} > 1550
|
||||
%endif
|
||||
|
||||
%if %{with externally_managed}
|
||||
# PEP-0668
|
||||
%{sitedir}/EXTERNALLY-MANAGED
|
||||
%endif
|
||||
@@ -908,8 +1026,10 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo
|
||||
%if %{primary_interpreter}
|
||||
%{_rpmconfigdir}/macros.d/macros.python3
|
||||
%endif
|
||||
|
||||
# binary parts
|
||||
%dir %{sitedir}/lib-dynload
|
||||
|
||||
%{dynlib array}
|
||||
%{dynlib _asyncio}
|
||||
%{dynlib binascii}
|
||||
@@ -970,11 +1090,13 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo
|
||||
%{dynlib _sha1}
|
||||
%{dynlib _sha2}
|
||||
%{dynlib _sha3}
|
||||
# python parts
|
||||
%dir %{_prefix}/lib/python%{python_version}
|
||||
%dir %{_prefix}/lib/python%{python_version}/site-packages
|
||||
%dir %{_prefix}/lib/python%{python_version}/site-packages/__pycache__
|
||||
|
||||
%dir %{sitedir}
|
||||
# python parts
|
||||
%dir %{_prefix}/lib/python%{python_abi}
|
||||
%dir %{_prefix}/lib/python%{python_abi}/site-packages
|
||||
%dir %{_prefix}/lib/python%{python_abi}/site-packages/__pycache__
|
||||
|
||||
%dir %{sitedir}/site-packages
|
||||
%dir %{sitedir}/site-packages/__pycache__
|
||||
# %%exclude %%{sitedir}/*/test
|
||||
@@ -1018,9 +1140,11 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo
|
||||
%{_bindir}/pydoc3
|
||||
%endif
|
||||
# executables
|
||||
%if %{with GIL}
|
||||
%attr(755, root, root) %{_bindir}/pydoc%{python_version}
|
||||
# %%attr(755, root, root) %%{_bindir}/python%%{python_abi}
|
||||
%attr(755, root, root) %{_bindir}/python%{python_version}
|
||||
%endif
|
||||
%attr(755, root, root) %{_bindir}/python%{python_abi}
|
||||
|
||||
# endif for if base
|
||||
%endif
|
||||
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
---
|
||||
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')
|
||||
@@ -292,7 +292,11 @@ class ProcessTestCase(BaseTestCase):
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user