Bump the PYC magic number for a change in annotate functions

This commit is contained in:
Miro Hrončok 2025-01-02 11:30:18 +01:00
commit 85202ae1ee
2 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,44 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Date: Thu, 19 Dec 2024 07:28:31 -0800
Subject: [PATCH] 00447: gh-128089: Bump the PYC magic number for a change in
annotate functions
The magic number should have been increased in release 3.14a3. Users running
3.14a3 with PYC files generated using earlier alphas may run into problems.
---
Include/internal/pycore_magic_number.h | 3 ++-
.../2024-12-19-07-32-43.gh-issue-128089.3uOOM-.rst | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
create mode 100644 Misc/NEWS.d/next/Core_and_Builtins/2024-12-19-07-32-43.gh-issue-128089.3uOOM-.rst
diff --git a/Include/internal/pycore_magic_number.h b/Include/internal/pycore_magic_number.h
index 14e2957687..9ab327afb6 100644
--- a/Include/internal/pycore_magic_number.h
+++ b/Include/internal/pycore_magic_number.h
@@ -262,6 +262,7 @@ Known values:
Python 3.14a1 3607 (Add pseudo instructions JUMP_IF_TRUE/FALSE)
Python 3.14a1 3608 (Add support for slices)
Python 3.14a2 3609 (Add LOAD_SMALL_INT and LOAD_CONST_IMMORTAL instructions, remove RETURN_CONST)
+ Python 3.14a4 3610 (Add VALUE_WITH_FAKE_GLOBALS format to annotationlib)
Python 3.15 will start with 3650
@@ -274,7 +275,7 @@ PC/launcher.c must also be updated.
*/
-#define PYC_MAGIC_NUMBER 3609
+#define PYC_MAGIC_NUMBER 3610
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
(little-endian) and then appending b'\r\n'. */
#define PYC_MAGIC_NUMBER_TOKEN \
diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2024-12-19-07-32-43.gh-issue-128089.3uOOM-.rst b/Misc/NEWS.d/next/Core_and_Builtins/2024-12-19-07-32-43.gh-issue-128089.3uOOM-.rst
new file mode 100644
index 0000000000..69687bc516
--- /dev/null
+++ b/Misc/NEWS.d/next/Core_and_Builtins/2024-12-19-07-32-43.gh-issue-128089.3uOOM-.rst
@@ -0,0 +1,3 @@
+Bump the PYC magic number for an internal change in annotate functions. The
+magic number should have been increased in release 3.14a3. Users running
+3.14a3 with PYC files generated using earlier alphas may run into problems.

View file

@ -351,6 +351,13 @@ Source11: idle3.appdata.xml
# pypa/distutils integration: https://github.com/pypa/distutils/pull/70
Patch251: 00251-change-user-install-location.patch
# 00447 # 79a44c0acfc4c88a1051c133c386da35e10fdee2
# gh-128089: Bump the PYC magic number for a change in annotate functions
#
# The magic number should have been increased in release 3.14a3. Users running
# 3.14a3 with PYC files generated using earlier alphas may run into problems.
Patch447: 00447-gh-128089-bump-the-magic-number.patch
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,