diff --git a/00251-change-user-install-location.patch b/00251-change-user-install-location.patch index ece7bd5..be55264 100644 --- a/00251-change-user-install-location.patch +++ b/00251-change-user-install-location.patch @@ -51,7 +51,7 @@ index 9da8b6724e..b53dd21d51 100644 if os.path.isdir(sitedir): addsitedir(sitedir, known_paths) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index 69f72452c4..6d5d096644 100644 +index 18e6b8d25e..42df12fad4 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py @@ -106,6 +106,12 @@ diff --git a/00451-gh-130030-fix-crash-on-32-bit-linux-with-free-threading-gh-130043.patch b/00451-gh-130030-fix-crash-on-32-bit-linux-with-free-threading-gh-130043.patch deleted file mode 100644 index f810a87..0000000 --- a/00451-gh-130030-fix-crash-on-32-bit-linux-with-free-threading-gh-130043.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Sam Gross -Date: Wed, 12 Feb 2025 18:09:15 -0500 -Subject: [PATCH] 00451: gh-130030: Fix crash on 32-bit Linux with free - threading (gh-130043) - -The `gc_get_refs` assertion needs to be after we check the alive and -unreachable bits. Otherwise, `ob_tid` may store the actual thread id -instead of the computed `gc_refs`, which may trigger the assertion if -the `ob_tid` looks like a negative value. - -Also fix a few type warnings on 32-bit systems. ---- - Objects/obmalloc.c | 12 ++++++------ - Python/gc_free_threading.c | 12 +++++++----- - 2 files changed, 13 insertions(+), 11 deletions(-) - -diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c -index 5688049b02..6341251007 100644 ---- a/Objects/obmalloc.c -+++ b/Objects/obmalloc.c -@@ -3297,12 +3297,12 @@ static bool _collect_alloc_stats( - static void - py_mimalloc_print_stats(FILE *out) - { -- fprintf(out, "Small block threshold = %zd, in %u size classes.\n", -- MI_SMALL_OBJ_SIZE_MAX, MI_BIN_HUGE); -- fprintf(out, "Medium block threshold = %zd\n", -- MI_MEDIUM_OBJ_SIZE_MAX); -- fprintf(out, "Large object max size = %zd\n", -- MI_LARGE_OBJ_SIZE_MAX); -+ fprintf(out, "Small block threshold = %zu, in %u size classes.\n", -+ (size_t)MI_SMALL_OBJ_SIZE_MAX, MI_BIN_HUGE); -+ fprintf(out, "Medium block threshold = %zu\n", -+ (size_t)MI_MEDIUM_OBJ_SIZE_MAX); -+ fprintf(out, "Large object max size = %zu\n", -+ (size_t)MI_LARGE_OBJ_SIZE_MAX); - - mi_heap_t *heap = mi_heap_get_default(); - struct _alloc_stats stats; -diff --git a/Python/gc_free_threading.c b/Python/gc_free_threading.c -index 9e459da3a4..0d6fddb570 100644 ---- a/Python/gc_free_threading.c -+++ b/Python/gc_free_threading.c -@@ -581,11 +581,13 @@ gc_mark_buffer_len(gc_mark_args_t *args) - } - - // Returns number of free entry slots in buffer -+#ifndef NDEBUG - static inline unsigned int - gc_mark_buffer_avail(gc_mark_args_t *args) - { - return BUFFER_SIZE - gc_mark_buffer_len(args); - } -+#endif - - static inline bool - gc_mark_buffer_is_empty(gc_mark_args_t *args) -@@ -1074,14 +1076,14 @@ mark_heap_visitor(const mi_heap_t *heap, const mi_heap_area_t *area, - return true; - } - -- _PyObject_ASSERT_WITH_MSG(op, gc_get_refs(op) >= 0, -- "refcount is too small"); -- - if (gc_is_alive(op) || !gc_is_unreachable(op)) { - // Object was already marked as reachable. - return true; - } - -+ _PyObject_ASSERT_WITH_MSG(op, gc_get_refs(op) >= 0, -+ "refcount is too small"); -+ - // GH-129236: If we've seen an active frame without a valid stack pointer, - // then we can't collect objects with deferred references because we may - // have missed some reference to the object on the stack. In that case, -@@ -1178,10 +1180,10 @@ move_legacy_finalizer_reachable(struct collection_state *state); - static void - gc_prime_from_spans(gc_mark_args_t *args) - { -- Py_ssize_t space = BUFFER_HI - gc_mark_buffer_len(args); -+ unsigned int space = BUFFER_HI - gc_mark_buffer_len(args); - // there should always be at least this amount of space - assert(space <= gc_mark_buffer_avail(args)); -- assert(space > 0); -+ assert(space <= BUFFER_HI); - gc_span_t entry = args->spans.stack[--args->spans.size]; - // spans on the stack should always have one or more elements - assert(entry.start < entry.end); diff --git a/python3.14.spec b/python3.14.spec index 94e78e6..244a138 100644 --- a/python3.14.spec +++ b/python3.14.spec @@ -14,7 +14,7 @@ URL: https://www.python.org/ # WARNING When rebasing to a new Python version, # remember to update the python3-docs package as well %global general_version %{pybasever}.0 -%global prerel a5 +%global prerel a6 %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} Release: 1%{?dist} @@ -351,17 +351,6 @@ Source11: idle3.appdata.xml # pypa/distutils integration: https://github.com/pypa/distutils/pull/70 Patch251: 00251-change-user-install-location.patch -# 00451 # 6b2c3f979219408cc0d48262c31f14a7da418ae2 -# gh-130030: Fix crash on 32-bit Linux with free threading (gh-130043) -# -# The `gc_get_refs` assertion needs to be after we check the alive and -# unreachable bits. Otherwise, `ob_tid` may store the actual thread id -# instead of the computed `gc_refs`, which may trigger the assertion if -# the `ob_tid` looks like a negative value. -# -# Also fix a few type warnings on 32-bit systems. -Patch451: 00451-gh-130030-fix-crash-on-32-bit-linux-with-free-threading-gh-130043.patch - # (New patches go here ^^^) # # When adding new patches to "python" and "python3" in Fedora, EL, etc., @@ -1379,6 +1368,8 @@ CheckPython freethreading %pure_python_modules %{pylibdir} %{pylibdir}/_sysconfig_vars_%{ABIFLAGS_optimized}_linux_%{platform_triplet}.json +# File defined by PEP 739 since Python 3.14: +%{pylibdir}/build-details.json # This will be in the tkinter package %exclude %{pylibdir}/turtle.py @@ -1628,6 +1619,8 @@ CheckPython freethreading %{pylibdir_freethreading}/turtledemo/ %{pylibdir_freethreading}/_sysconfig_vars_%{ABIFLAGS_freethreading}_linux_%{platform_triplet}.json +# File defined by PEP 739 since Python 3.14: +%{pylibdir_freethreading}/build-details.json # This will be in the -freethreading-debug package %if %{with debug_build} @@ -1705,6 +1698,9 @@ CheckPython freethreading # ====================================================== %changelog +* Mon Mar 17 2025 Karolina Surma - 3.14.0~a6-1 +- Update to Python 3.14.0a6 + * Wed Feb 12 2025 Karolina Surma - 3.14.0~a5-1 - Update to Python 3.14.0a5 diff --git a/sources b/sources index e9ab098..a424a41 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Python-3.14.0a5.tar.xz) = ae34c994f00c36c6ce18091c63eb3469aa545ee391c6879c89f5722f7311f2e97cc997477897969777dfaf98090e3dd01dcdb655c986140e9a7796f963be9df9 +SHA512 (Python-3.14.0a6.tar.xz) = 0fca503199bed0744139823aaf3ead30d7876556750b476fa6e1f701ae71fa7fe333cd46c775929c26729cf71bef6ba545fdc0118a0efca17c2434de3cadabe1 diff --git a/tests/tests.yml b/tests/tests.yml index 8af0de4..b1255ce 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -33,7 +33,8 @@ run: "VERSION={{ pybasever }} X='-i test_check_probes -i test_sysconfigdata_json' ./parallel.sh" - debugtest: dir: python/selftest - run: "VERSION={{ pybasever }} PYTHON=python{{ pybasever }}d X='-i test_check_probes -i test_sysconfigdata_json' ./parallel.sh" + # test_base_interpreter: https://github.com/python/cpython/issues/131372 + run: "VERSION={{ pybasever }} PYTHON=python{{ pybasever }}d X='-i test_check_probes -i test_sysconfigdata_json -i test_base_interpreter' ./parallel.sh" - optimizedflags: dir: python/flags run: "python{{ pybasever }} ./assertflags.py -O3 CFLAGS PY_BUILTIN_MODULE_CFLAGS PY_CFLAGS PY_CORE_CFLAGS PY_CFLAGS_NODIST PY_STDMODULE_CFLAGS"