diff --git a/00251-change-user-install-location.patch b/00251-change-user-install-location.patch index ce93045..264cfdf 100644 --- a/00251-change-user-install-location.patch +++ b/00251-change-user-install-location.patch @@ -51,7 +51,7 @@ index 92bd1ccdad..951784f3b4 100644 if os.path.isdir(sitedir): addsitedir(sitedir, known_paths) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index ed7b6a335d..2b1ee37775 100644 +index 7a4a8f65a5..c8fca72c01 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py @@ -106,6 +106,12 @@ diff --git a/00447-gh-128089-bump-the-magic-number.patch b/00447-gh-128089-bump-the-magic-number.patch deleted file mode 100644 index 034bc96..0000000 --- a/00447-gh-128089-bump-the-magic-number.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jelle Zijlstra -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. diff --git a/00448-gh-128916-do-not-set-so_reuseport-on-non--af_inet-sockets-gh-128933.patch b/00448-gh-128916-do-not-set-so_reuseport-on-non--af_inet-sockets-gh-128933.patch new file mode 100644 index 0000000..afee7af --- /dev/null +++ b/00448-gh-128916-do-not-set-so_reuseport-on-non--af_inet-sockets-gh-128933.patch @@ -0,0 +1,84 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sat, 18 Jan 2025 01:49:16 +0100 +Subject: [PATCH] 00448: gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` + sockets (GH-128933) + +* gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets + +Do not attempt to set ``SO_REUSEPORT`` on sockets of address familifies other +than ``AF_INET`` and ``AF_INET6``, as it is meaningless with these address +families, and the call with fail with Linux kernel 6.12.9 and newer. + +* Apply suggestions from code review + +Co-authored-by: Vinay Sajip + +--------- + +Co-authored-by: Vinay Sajip +--- + Lib/asyncio/base_events.py | 4 +++- + Lib/socket.py | 4 +++- + Lib/socketserver.py | 7 ++++++- + .../Library/2025-01-17-11-46-16.gh-issue-128916.GEePbO.rst | 3 +++ + 4 files changed, 15 insertions(+), 3 deletions(-) + create mode 100644 Misc/NEWS.d/next/Library/2025-01-17-11-46-16.gh-issue-128916.GEePbO.rst + +diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py +index 6e6e5aaac1..85018797db 100644 +--- a/Lib/asyncio/base_events.py ++++ b/Lib/asyncio/base_events.py +@@ -1593,7 +1593,9 @@ async def create_server( + if reuse_address: + sock.setsockopt( + socket.SOL_SOCKET, socket.SO_REUSEADDR, True) +- if reuse_port: ++ # Since Linux 6.12.9, SO_REUSEPORT is not allowed ++ # on other address families than AF_INET/AF_INET6. ++ if reuse_port and af in (socket.AF_INET, socket.AF_INET6): + _set_reuseport(sock) + if keep_alive: + sock.setsockopt( +diff --git a/Lib/socket.py b/Lib/socket.py +index be37c24d61..727b0e75f0 100644 +--- a/Lib/socket.py ++++ b/Lib/socket.py +@@ -937,7 +937,9 @@ def create_server(address, *, family=AF_INET, backlog=None, reuse_port=False, + # Fail later on bind(), for platforms which may not + # support this option. + pass +- if reuse_port: ++ # Since Linux 6.12.9, SO_REUSEPORT is not allowed ++ # on other address families than AF_INET/AF_INET6. ++ if reuse_port and family in (AF_INET, AF_INET6): + sock.setsockopt(SOL_SOCKET, SO_REUSEPORT, 1) + if has_ipv6 and family == AF_INET6: + if dualstack_ipv6: +diff --git a/Lib/socketserver.py b/Lib/socketserver.py +index cd028ef1c6..35b2723de3 100644 +--- a/Lib/socketserver.py ++++ b/Lib/socketserver.py +@@ -468,7 +468,12 @@ def server_bind(self): + """ + if self.allow_reuse_address and hasattr(socket, "SO_REUSEADDR"): + self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) +- if self.allow_reuse_port and hasattr(socket, "SO_REUSEPORT"): ++ # Since Linux 6.12.9, SO_REUSEPORT is not allowed ++ # on other address families than AF_INET/AF_INET6. ++ if ( ++ self.allow_reuse_port and hasattr(socket, "SO_REUSEPORT") ++ and self.address_family in (socket.AF_INET, socket.AF_INET6) ++ ): + self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1) + self.socket.bind(self.server_address) + self.server_address = self.socket.getsockname() +diff --git a/Misc/NEWS.d/next/Library/2025-01-17-11-46-16.gh-issue-128916.GEePbO.rst b/Misc/NEWS.d/next/Library/2025-01-17-11-46-16.gh-issue-128916.GEePbO.rst +new file mode 100644 +index 0000000000..f2db341ef8 +--- /dev/null ++++ b/Misc/NEWS.d/next/Library/2025-01-17-11-46-16.gh-issue-128916.GEePbO.rst +@@ -0,0 +1,3 @@ ++Do not attempt to set ``SO_REUSEPORT`` on sockets of address families ++other than ``AF_INET`` and ``AF_INET6``, as it is meaningless with these ++address families, and the call with fail with Linux kernel 6.12.9 and newer. diff --git a/00449-gh-128889-zero-out-memory-ctypes-for-generated-struct-layout-tests-gh-128944.patch b/00449-gh-128889-zero-out-memory-ctypes-for-generated-struct-layout-tests-gh-128944.patch new file mode 100644 index 0000000..345c562 --- /dev/null +++ b/00449-gh-128889-zero-out-memory-ctypes-for-generated-struct-layout-tests-gh-128944.patch @@ -0,0 +1,758 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Petr Viktorin +Date: Tue, 21 Jan 2025 16:29:02 +0100 +Subject: [PATCH] 00449: gh-128889: Zero out memory ctypes for generated struct + layout tests (GH-128944) + +--- + .../test_ctypes/test_generated_structs.py | 5 +- + Modules/_ctypes/_ctypes_test_generated.c.h | 216 ++++++++++++------ + 2 files changed, 147 insertions(+), 74 deletions(-) + +diff --git a/Lib/test/test_ctypes/test_generated_structs.py b/Lib/test/test_ctypes/test_generated_structs.py +index d61754d6d4..1df9f0dc16 100644 +--- a/Lib/test/test_ctypes/test_generated_structs.py ++++ b/Lib/test/test_ctypes/test_generated_structs.py +@@ -443,7 +443,7 @@ def test_generated_data(self): + - None + - reason to skip the test (str) + +- This does depend on the C compiler keeping padding bits zero. ++ This does depend on the C compiler keeping padding bits unchanged. + Common compilers seem to do so. + """ + for name, cls in TESTCASES.items(): +@@ -696,7 +696,8 @@ def output(string): + output(' ' + line) + typename = f'{struct_or_union(cls)} {name}' + output(f""" +- {typename} value = {{0}}; ++ {typename} value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString({c_str_repr(name)})); + APPEND(PyLong_FromLong(sizeof({typename}))); + APPEND(PyLong_FromLong(_Alignof({typename}))); +diff --git a/Modules/_ctypes/_ctypes_test_generated.c.h b/Modules/_ctypes/_ctypes_test_generated.c.h +index 46a3e4b01e..d70b33eaa8 100644 +--- a/Modules/_ctypes/_ctypes_test_generated.c.h ++++ b/Modules/_ctypes/_ctypes_test_generated.c.h +@@ -56,7 +56,8 @@ + struct SingleInt { + int a; + }; +- struct SingleInt value = {0}; ++ struct SingleInt value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("SingleInt")); + APPEND(PyLong_FromLong(sizeof(struct SingleInt))); + APPEND(PyLong_FromLong(_Alignof(struct SingleInt))); +@@ -69,7 +70,8 @@ + union SingleInt_Union { + int a; + }; +- union SingleInt_Union value = {0}; ++ union SingleInt_Union value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("SingleInt_Union")); + APPEND(PyLong_FromLong(sizeof(union SingleInt_Union))); + APPEND(PyLong_FromLong(_Alignof(union SingleInt_Union))); +@@ -82,7 +84,8 @@ + struct SingleU32 { + uint32_t a; + }; +- struct SingleU32 value = {0}; ++ struct SingleU32 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("SingleU32")); + APPEND(PyLong_FromLong(sizeof(struct SingleU32))); + APPEND(PyLong_FromLong(_Alignof(struct SingleU32))); +@@ -97,7 +100,8 @@ + int8_t y; + uint16_t z; + }; +- struct SimpleStruct value = {0}; ++ struct SimpleStruct value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("SimpleStruct")); + APPEND(PyLong_FromLong(sizeof(struct SimpleStruct))); + APPEND(PyLong_FromLong(_Alignof(struct SimpleStruct))); +@@ -114,7 +118,8 @@ + int8_t y; + uint16_t z; + }; +- union SimpleUnion value = {0}; ++ union SimpleUnion value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("SimpleUnion")); + APPEND(PyLong_FromLong(sizeof(union SimpleUnion))); + APPEND(PyLong_FromLong(_Alignof(union SimpleUnion))); +@@ -136,7 +141,8 @@ + int64_t i64; + uint64_t u64; + }; +- struct ManyTypes value = {0}; ++ struct ManyTypes value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("ManyTypes")); + APPEND(PyLong_FromLong(sizeof(struct ManyTypes))); + APPEND(PyLong_FromLong(_Alignof(struct ManyTypes))); +@@ -163,7 +169,8 @@ + int64_t i64; + uint64_t u64; + }; +- union ManyTypesU value = {0}; ++ union ManyTypesU value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("ManyTypesU")); + APPEND(PyLong_FromLong(sizeof(union ManyTypesU))); + APPEND(PyLong_FromLong(_Alignof(union ManyTypesU))); +@@ -197,7 +204,8 @@ + uint16_t z; + }; + }; +- struct Nested value = {0}; ++ struct Nested value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Nested")); + APPEND(PyLong_FromLong(sizeof(struct Nested))); + APPEND(PyLong_FromLong(_Alignof(struct Nested))); +@@ -223,7 +231,8 @@ + int64_t b; + }; + #pragma pack(pop) +- struct Packed1 value = {0}; ++ struct Packed1 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Packed1")); + APPEND(PyLong_FromLong(sizeof(struct Packed1))); + APPEND(PyLong_FromLong(_Alignof(struct Packed1))); +@@ -247,7 +256,8 @@ + int64_t b; + }; + #pragma pack(pop) +- struct Packed2 value = {0}; ++ struct Packed2 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Packed2")); + APPEND(PyLong_FromLong(sizeof(struct Packed2))); + APPEND(PyLong_FromLong(_Alignof(struct Packed2))); +@@ -271,7 +281,8 @@ + int64_t b; + }; + #pragma pack(pop) +- struct Packed3 value = {0}; ++ struct Packed3 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Packed3")); + APPEND(PyLong_FromLong(sizeof(struct Packed3))); + APPEND(PyLong_FromLong(_Alignof(struct Packed3))); +@@ -295,7 +306,8 @@ + int64_t b; + }; + #pragma pack(pop) +- struct Packed4 value = {0}; ++ struct Packed4 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Packed4")); + APPEND(PyLong_FromLong(sizeof(struct Packed4))); + APPEND(PyLong_FromLong(_Alignof(struct Packed4))); +@@ -316,7 +328,8 @@ + int64_t b; + int32_t c; + }; +- struct X86_32EdgeCase value = {0}; ++ struct X86_32EdgeCase value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("X86_32EdgeCase")); + APPEND(PyLong_FromLong(sizeof(struct X86_32EdgeCase))); + APPEND(PyLong_FromLong(_Alignof(struct X86_32EdgeCase))); +@@ -333,7 +346,8 @@ + unsigned int b :5; + unsigned int c :7; + }; +- struct MSBitFieldExample value = {0}; ++ struct MSBitFieldExample value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("MSBitFieldExample")); + APPEND(PyLong_FromLong(sizeof(struct MSBitFieldExample))); + APPEND(PyLong_FromLong(_Alignof(struct MSBitFieldExample))); +@@ -351,7 +365,8 @@ + unsigned int may_straddle :30; + unsigned int last :18; + }; +- struct MSStraddlingExample value = {0}; ++ struct MSStraddlingExample value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("MSStraddlingExample")); + APPEND(PyLong_FromLong(sizeof(struct MSStraddlingExample))); + APPEND(PyLong_FromLong(_Alignof(struct MSStraddlingExample))); +@@ -375,7 +390,8 @@ + int H :8; + int I :9; + }; +- struct IntBits value = {0}; ++ struct IntBits value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("IntBits")); + APPEND(PyLong_FromLong(sizeof(struct IntBits))); + APPEND(PyLong_FromLong(_Alignof(struct IntBits))); +@@ -413,7 +429,8 @@ + short R :6; + short S :7; + }; +- struct Bits value = {0}; ++ struct Bits value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Bits")); + APPEND(PyLong_FromLong(sizeof(struct Bits))); + APPEND(PyLong_FromLong(_Alignof(struct Bits))); +@@ -456,7 +473,8 @@ + int H :8; + int I :9; + }; +- struct IntBits_MSVC value = {0}; ++ struct IntBits_MSVC value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("IntBits_MSVC")); + APPEND(PyLong_FromLong(sizeof(struct IntBits_MSVC))); + APPEND(PyLong_FromLong(_Alignof(struct IntBits_MSVC))); +@@ -499,7 +517,8 @@ + short R :6; + short S :7; + }; +- struct Bits_MSVC value = {0}; ++ struct Bits_MSVC value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Bits_MSVC")); + APPEND(PyLong_FromLong(sizeof(struct Bits_MSVC))); + APPEND(PyLong_FromLong(_Alignof(struct Bits_MSVC))); +@@ -536,7 +555,8 @@ + int64_t b :62; + int64_t c :1; + }; +- struct I64Bits value = {0}; ++ struct I64Bits value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("I64Bits")); + APPEND(PyLong_FromLong(sizeof(struct I64Bits))); + APPEND(PyLong_FromLong(_Alignof(struct I64Bits))); +@@ -560,7 +580,8 @@ + uint64_t b :62; + uint64_t c :1; + }; +- struct U64Bits value = {0}; ++ struct U64Bits value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("U64Bits")); + APPEND(PyLong_FromLong(sizeof(struct U64Bits))); + APPEND(PyLong_FromLong(_Alignof(struct U64Bits))); +@@ -584,7 +605,8 @@ + int8_t b :3; + int8_t c :1; + }; +- struct Struct331_8 value = {0}; ++ struct Struct331_8 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct331_8")); + APPEND(PyLong_FromLong(sizeof(struct Struct331_8))); + APPEND(PyLong_FromLong(_Alignof(struct Struct331_8))); +@@ -608,7 +630,8 @@ + int8_t b :6; + int8_t c :1; + }; +- struct Struct1x1_8 value = {0}; ++ struct Struct1x1_8 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1x1_8")); + APPEND(PyLong_FromLong(sizeof(struct Struct1x1_8))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1x1_8))); +@@ -633,7 +656,8 @@ + int8_t b :6; + int8_t c :1; + }; +- struct Struct1nx1_8 value = {0}; ++ struct Struct1nx1_8 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1nx1_8")); + APPEND(PyLong_FromLong(sizeof(struct Struct1nx1_8))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1nx1_8))); +@@ -658,7 +682,8 @@ + int8_t b :6; + int8_t c :6; + }; +- struct Struct3xx_8 value = {0}; ++ struct Struct3xx_8 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct3xx_8")); + APPEND(PyLong_FromLong(sizeof(struct Struct3xx_8))); + APPEND(PyLong_FromLong(_Alignof(struct Struct3xx_8))); +@@ -682,7 +707,8 @@ + uint8_t b :3; + uint8_t c :1; + }; +- struct Struct331_u8 value = {0}; ++ struct Struct331_u8 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct331_u8")); + APPEND(PyLong_FromLong(sizeof(struct Struct331_u8))); + APPEND(PyLong_FromLong(_Alignof(struct Struct331_u8))); +@@ -706,7 +732,8 @@ + uint8_t b :6; + uint8_t c :1; + }; +- struct Struct1x1_u8 value = {0}; ++ struct Struct1x1_u8 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1x1_u8")); + APPEND(PyLong_FromLong(sizeof(struct Struct1x1_u8))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1x1_u8))); +@@ -731,7 +758,8 @@ + uint8_t b :6; + uint8_t c :1; + }; +- struct Struct1nx1_u8 value = {0}; ++ struct Struct1nx1_u8 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1nx1_u8")); + APPEND(PyLong_FromLong(sizeof(struct Struct1nx1_u8))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1nx1_u8))); +@@ -756,7 +784,8 @@ + uint8_t b :6; + uint8_t c :6; + }; +- struct Struct3xx_u8 value = {0}; ++ struct Struct3xx_u8 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct3xx_u8")); + APPEND(PyLong_FromLong(sizeof(struct Struct3xx_u8))); + APPEND(PyLong_FromLong(_Alignof(struct Struct3xx_u8))); +@@ -780,7 +809,8 @@ + int16_t b :3; + int16_t c :1; + }; +- struct Struct331_16 value = {0}; ++ struct Struct331_16 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct331_16")); + APPEND(PyLong_FromLong(sizeof(struct Struct331_16))); + APPEND(PyLong_FromLong(_Alignof(struct Struct331_16))); +@@ -804,7 +834,8 @@ + int16_t b :14; + int16_t c :1; + }; +- struct Struct1x1_16 value = {0}; ++ struct Struct1x1_16 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1x1_16")); + APPEND(PyLong_FromLong(sizeof(struct Struct1x1_16))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1x1_16))); +@@ -829,7 +860,8 @@ + int16_t b :14; + int16_t c :1; + }; +- struct Struct1nx1_16 value = {0}; ++ struct Struct1nx1_16 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1nx1_16")); + APPEND(PyLong_FromLong(sizeof(struct Struct1nx1_16))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1nx1_16))); +@@ -854,7 +886,8 @@ + int16_t b :14; + int16_t c :14; + }; +- struct Struct3xx_16 value = {0}; ++ struct Struct3xx_16 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct3xx_16")); + APPEND(PyLong_FromLong(sizeof(struct Struct3xx_16))); + APPEND(PyLong_FromLong(_Alignof(struct Struct3xx_16))); +@@ -878,7 +911,8 @@ + uint16_t b :3; + uint16_t c :1; + }; +- struct Struct331_u16 value = {0}; ++ struct Struct331_u16 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct331_u16")); + APPEND(PyLong_FromLong(sizeof(struct Struct331_u16))); + APPEND(PyLong_FromLong(_Alignof(struct Struct331_u16))); +@@ -902,7 +936,8 @@ + uint16_t b :14; + uint16_t c :1; + }; +- struct Struct1x1_u16 value = {0}; ++ struct Struct1x1_u16 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1x1_u16")); + APPEND(PyLong_FromLong(sizeof(struct Struct1x1_u16))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1x1_u16))); +@@ -927,7 +962,8 @@ + uint16_t b :14; + uint16_t c :1; + }; +- struct Struct1nx1_u16 value = {0}; ++ struct Struct1nx1_u16 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1nx1_u16")); + APPEND(PyLong_FromLong(sizeof(struct Struct1nx1_u16))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1nx1_u16))); +@@ -952,7 +988,8 @@ + uint16_t b :14; + uint16_t c :14; + }; +- struct Struct3xx_u16 value = {0}; ++ struct Struct3xx_u16 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct3xx_u16")); + APPEND(PyLong_FromLong(sizeof(struct Struct3xx_u16))); + APPEND(PyLong_FromLong(_Alignof(struct Struct3xx_u16))); +@@ -976,7 +1013,8 @@ + int32_t b :3; + int32_t c :1; + }; +- struct Struct331_32 value = {0}; ++ struct Struct331_32 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct331_32")); + APPEND(PyLong_FromLong(sizeof(struct Struct331_32))); + APPEND(PyLong_FromLong(_Alignof(struct Struct331_32))); +@@ -1000,7 +1038,8 @@ + int32_t b :30; + int32_t c :1; + }; +- struct Struct1x1_32 value = {0}; ++ struct Struct1x1_32 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1x1_32")); + APPEND(PyLong_FromLong(sizeof(struct Struct1x1_32))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1x1_32))); +@@ -1025,7 +1064,8 @@ + int32_t b :30; + int32_t c :1; + }; +- struct Struct1nx1_32 value = {0}; ++ struct Struct1nx1_32 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1nx1_32")); + APPEND(PyLong_FromLong(sizeof(struct Struct1nx1_32))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1nx1_32))); +@@ -1050,7 +1090,8 @@ + int32_t b :30; + int32_t c :30; + }; +- struct Struct3xx_32 value = {0}; ++ struct Struct3xx_32 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct3xx_32")); + APPEND(PyLong_FromLong(sizeof(struct Struct3xx_32))); + APPEND(PyLong_FromLong(_Alignof(struct Struct3xx_32))); +@@ -1074,7 +1115,8 @@ + uint32_t b :3; + uint32_t c :1; + }; +- struct Struct331_u32 value = {0}; ++ struct Struct331_u32 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct331_u32")); + APPEND(PyLong_FromLong(sizeof(struct Struct331_u32))); + APPEND(PyLong_FromLong(_Alignof(struct Struct331_u32))); +@@ -1098,7 +1140,8 @@ + uint32_t b :30; + uint32_t c :1; + }; +- struct Struct1x1_u32 value = {0}; ++ struct Struct1x1_u32 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1x1_u32")); + APPEND(PyLong_FromLong(sizeof(struct Struct1x1_u32))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1x1_u32))); +@@ -1123,7 +1166,8 @@ + uint32_t b :30; + uint32_t c :1; + }; +- struct Struct1nx1_u32 value = {0}; ++ struct Struct1nx1_u32 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1nx1_u32")); + APPEND(PyLong_FromLong(sizeof(struct Struct1nx1_u32))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1nx1_u32))); +@@ -1148,7 +1192,8 @@ + uint32_t b :30; + uint32_t c :30; + }; +- struct Struct3xx_u32 value = {0}; ++ struct Struct3xx_u32 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct3xx_u32")); + APPEND(PyLong_FromLong(sizeof(struct Struct3xx_u32))); + APPEND(PyLong_FromLong(_Alignof(struct Struct3xx_u32))); +@@ -1172,7 +1217,8 @@ + int64_t b :3; + int64_t c :1; + }; +- struct Struct331_64 value = {0}; ++ struct Struct331_64 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct331_64")); + APPEND(PyLong_FromLong(sizeof(struct Struct331_64))); + APPEND(PyLong_FromLong(_Alignof(struct Struct331_64))); +@@ -1196,7 +1242,8 @@ + int64_t b :62; + int64_t c :1; + }; +- struct Struct1x1_64 value = {0}; ++ struct Struct1x1_64 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1x1_64")); + APPEND(PyLong_FromLong(sizeof(struct Struct1x1_64))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1x1_64))); +@@ -1221,7 +1268,8 @@ + int64_t b :62; + int64_t c :1; + }; +- struct Struct1nx1_64 value = {0}; ++ struct Struct1nx1_64 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1nx1_64")); + APPEND(PyLong_FromLong(sizeof(struct Struct1nx1_64))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1nx1_64))); +@@ -1246,7 +1294,8 @@ + int64_t b :62; + int64_t c :62; + }; +- struct Struct3xx_64 value = {0}; ++ struct Struct3xx_64 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct3xx_64")); + APPEND(PyLong_FromLong(sizeof(struct Struct3xx_64))); + APPEND(PyLong_FromLong(_Alignof(struct Struct3xx_64))); +@@ -1270,7 +1319,8 @@ + uint64_t b :3; + uint64_t c :1; + }; +- struct Struct331_u64 value = {0}; ++ struct Struct331_u64 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct331_u64")); + APPEND(PyLong_FromLong(sizeof(struct Struct331_u64))); + APPEND(PyLong_FromLong(_Alignof(struct Struct331_u64))); +@@ -1294,7 +1344,8 @@ + uint64_t b :62; + uint64_t c :1; + }; +- struct Struct1x1_u64 value = {0}; ++ struct Struct1x1_u64 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1x1_u64")); + APPEND(PyLong_FromLong(sizeof(struct Struct1x1_u64))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1x1_u64))); +@@ -1319,7 +1370,8 @@ + uint64_t b :62; + uint64_t c :1; + }; +- struct Struct1nx1_u64 value = {0}; ++ struct Struct1nx1_u64 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct1nx1_u64")); + APPEND(PyLong_FromLong(sizeof(struct Struct1nx1_u64))); + APPEND(PyLong_FromLong(_Alignof(struct Struct1nx1_u64))); +@@ -1344,7 +1396,8 @@ + uint64_t b :62; + uint64_t c :62; + }; +- struct Struct3xx_u64 value = {0}; ++ struct Struct3xx_u64 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Struct3xx_u64")); + APPEND(PyLong_FromLong(sizeof(struct Struct3xx_u64))); + APPEND(PyLong_FromLong(_Alignof(struct Struct3xx_u64))); +@@ -1367,7 +1420,8 @@ + signed char a :4; + int b :4; + }; +- struct Mixed1 value = {0}; ++ struct Mixed1 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Mixed1")); + APPEND(PyLong_FromLong(sizeof(struct Mixed1))); + APPEND(PyLong_FromLong(_Alignof(struct Mixed1))); +@@ -1389,7 +1443,8 @@ + signed char a :4; + int32_t b :32; + }; +- struct Mixed2 value = {0}; ++ struct Mixed2 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Mixed2")); + APPEND(PyLong_FromLong(sizeof(struct Mixed2))); + APPEND(PyLong_FromLong(_Alignof(struct Mixed2))); +@@ -1411,7 +1466,8 @@ + signed char a :4; + unsigned char b :4; + }; +- struct Mixed3 value = {0}; ++ struct Mixed3 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Mixed3")); + APPEND(PyLong_FromLong(sizeof(struct Mixed3))); + APPEND(PyLong_FromLong(_Alignof(struct Mixed3))); +@@ -1437,7 +1493,8 @@ + short e :4; + int f :24; + }; +- struct Mixed4 value = {0}; ++ struct Mixed4 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Mixed4")); + APPEND(PyLong_FromLong(sizeof(struct Mixed4))); + APPEND(PyLong_FromLong(_Alignof(struct Mixed4))); +@@ -1463,7 +1520,8 @@ + unsigned int A :1; + unsigned short B :16; + }; +- struct Mixed5 value = {0}; ++ struct Mixed5 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Mixed5")); + APPEND(PyLong_FromLong(sizeof(struct Mixed5))); + APPEND(PyLong_FromLong(_Alignof(struct Mixed5))); +@@ -1485,7 +1543,8 @@ + unsigned long long A :1; + unsigned int B :32; + }; +- struct Mixed6 value = {0}; ++ struct Mixed6 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Mixed6")); + APPEND(PyLong_FromLong(sizeof(struct Mixed6))); + APPEND(PyLong_FromLong(_Alignof(struct Mixed6))); +@@ -1508,7 +1567,8 @@ + uint32_t B :20; + uint64_t C :24; + }; +- struct Mixed7 value = {0}; ++ struct Mixed7 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Mixed7")); + APPEND(PyLong_FromLong(sizeof(struct Mixed7))); + APPEND(PyLong_FromLong(_Alignof(struct Mixed7))); +@@ -1532,7 +1592,8 @@ + uint32_t B :32; + unsigned long long C :1; + }; +- struct Mixed8_a value = {0}; ++ struct Mixed8_a value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Mixed8_a")); + APPEND(PyLong_FromLong(sizeof(struct Mixed8_a))); + APPEND(PyLong_FromLong(_Alignof(struct Mixed8_a))); +@@ -1556,7 +1617,8 @@ + uint32_t B; + unsigned long long C :1; + }; +- struct Mixed8_b value = {0}; ++ struct Mixed8_b value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Mixed8_b")); + APPEND(PyLong_FromLong(sizeof(struct Mixed8_b))); + APPEND(PyLong_FromLong(_Alignof(struct Mixed8_b))); +@@ -1579,7 +1641,8 @@ + uint8_t A; + uint32_t B :1; + }; +- struct Mixed9 value = {0}; ++ struct Mixed9 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Mixed9")); + APPEND(PyLong_FromLong(sizeof(struct Mixed9))); + APPEND(PyLong_FromLong(_Alignof(struct Mixed9))); +@@ -1601,7 +1664,8 @@ + uint32_t A :1; + uint64_t B :1; + }; +- struct Mixed10 value = {0}; ++ struct Mixed10 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Mixed10")); + APPEND(PyLong_FromLong(sizeof(struct Mixed10))); + APPEND(PyLong_FromLong(_Alignof(struct Mixed10))); +@@ -1623,7 +1687,8 @@ + uint32_t A :1; + uint64_t B :1; + }; +- struct Example_gh_95496 value = {0}; ++ struct Example_gh_95496 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Example_gh_95496")); + APPEND(PyLong_FromLong(sizeof(struct Example_gh_95496))); + APPEND(PyLong_FromLong(_Alignof(struct Example_gh_95496))); +@@ -1655,7 +1720,8 @@ + uint16_t b1 :12; + }; + #pragma pack(pop) +- struct Example_gh_84039_bad value = {0}; ++ struct Example_gh_84039_bad value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Example_gh_84039_bad")); + APPEND(PyLong_FromLong(sizeof(struct Example_gh_84039_bad))); + APPEND(PyLong_FromLong(_Alignof(struct Example_gh_84039_bad))); +@@ -1693,7 +1759,8 @@ + uint8_t a7 :1; + }; + #pragma pack(pop) +- struct Example_gh_84039_good_a value = {0}; ++ struct Example_gh_84039_good_a value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Example_gh_84039_good_a")); + APPEND(PyLong_FromLong(sizeof(struct Example_gh_84039_good_a))); + APPEND(PyLong_FromLong(_Alignof(struct Example_gh_84039_good_a))); +@@ -1735,7 +1802,8 @@ + uint16_t b1 :12; + }; + #pragma pack(pop) +- struct Example_gh_84039_good value = {0}; ++ struct Example_gh_84039_good value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Example_gh_84039_good")); + APPEND(PyLong_FromLong(sizeof(struct Example_gh_84039_good))); + APPEND(PyLong_FromLong(_Alignof(struct Example_gh_84039_good))); +@@ -1775,7 +1843,8 @@ + uint32_t R2 :2; + }; + #pragma pack(pop) +- struct Example_gh_73939 value = {0}; ++ struct Example_gh_73939 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Example_gh_73939")); + APPEND(PyLong_FromLong(sizeof(struct Example_gh_73939))); + APPEND(PyLong_FromLong(_Alignof(struct Example_gh_73939))); +@@ -1806,7 +1875,8 @@ + uint8_t b :8; + uint32_t c :16; + }; +- struct Example_gh_86098 value = {0}; ++ struct Example_gh_86098 value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Example_gh_86098")); + APPEND(PyLong_FromLong(sizeof(struct Example_gh_86098))); + APPEND(PyLong_FromLong(_Alignof(struct Example_gh_86098))); +@@ -1832,7 +1902,8 @@ + uint32_t c :16; + }; + #pragma pack(pop) +- struct Example_gh_86098_pack value = {0}; ++ struct Example_gh_86098_pack value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("Example_gh_86098_pack")); + APPEND(PyLong_FromLong(sizeof(struct Example_gh_86098_pack))); + APPEND(PyLong_FromLong(_Alignof(struct Example_gh_86098_pack))); +@@ -1858,7 +1929,8 @@ + }; + signed char y; + }; +- struct AnonBitfields value = {0}; ++ struct AnonBitfields value; ++ memset(&value, 0, sizeof(value)); + APPEND(PyUnicode_FromString("AnonBitfields")); + APPEND(PyLong_FromLong(sizeof(struct AnonBitfields))); + APPEND(PyLong_FromLong(_Alignof(struct AnonBitfields))); diff --git a/python3.14.spec b/python3.14.spec index 89b786d..2a5b3c5 100644 --- a/python3.14.spec +++ b/python3.14.spec @@ -14,10 +14,10 @@ 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 a3 +%global prerel a4 %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 1%{?dist} License: Python-2.0.1 @@ -351,12 +351,24 @@ 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 +# 00448 # e145ddea32596809c4222b05444c645eed2ea3af +# gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets (GH-128933) # -# 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 +# * gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets +# +# Do not attempt to set ``SO_REUSEPORT`` on sockets of address familifies other +# than ``AF_INET`` and ``AF_INET6``, as it is meaningless with these address +# families, and the call with fail with Linux kernel 6.12.9 and newer. +# +# * Apply suggestions from code review +# +# +# --------- +Patch448: 00448-gh-128916-do-not-set-so_reuseport-on-non--af_inet-sockets-gh-128933.patch + +# 00449 # ddd832ac88676343c94b57af00f892928d2c242d +# gh-128889: Zero out memory ctypes for generated struct layout tests (GH-128944) +Patch449: 00449-gh-128889-zero-out-memory-ctypes-for-generated-struct-layout-tests-gh-128944.patch # (New patches go here ^^^) # @@ -772,6 +784,9 @@ rm -r Modules/_decimal/libmpdec # (This is after patching, so that we can use patches directly from upstream) rm configure pyconfig.h.in +# Patch out the version requirement on autoconf 2.72 +# This can be removed when Fedora 40 goes EOL (2025-05-28) +sed -i "s/AC_PREREQ(\[2\.72\])/AC_PREREQ([2.71])/" configure.ac # ====================================================== # Configuring and building the code: @@ -1246,8 +1261,8 @@ CheckPython() { # test.test_concurrent_futures.test_deadlock tends to time out on s390x and ppc64le in # freethreading{,-debug} build, skipping it to shorten the build time # see: https://github.com/python/cpython/issues/121719 - # test_*_repeat_respect_immortality and test_immortals failures were reported: - # https://github.com/python/cpython/issues/128058 + # test_init_pyvenv_cfg is failing since 3.14.0a4, the issue is known upstream: + # https://github.com/python/cpython/issues/128690 LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \ -wW --slowest %{_smp_mflags} \ %ifarch riscv64 @@ -1257,6 +1272,7 @@ CheckPython() { %endif -i test_freeze_simple_script \ -i test_check_probes \ + -i test_init_pyvenv_cfg \ %ifarch %{mips64} -x test_ctypes \ %endif @@ -1264,11 +1280,6 @@ CheckPython() { -x test_signal \ -i test_deadlock \ %endif - %ifarch %{ix86} - -i test_tuple_repeat_respect_immortality \ - -i test_list_repeat_respect_immortality \ - -i test_immortals \ - %endif echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName @@ -1703,6 +1714,9 @@ CheckPython freethreading # ====================================================== %changelog +* Mon Jan 20 2025 Karolina Surma - 3.14.0~a4-1 +- Update to Python 3.14.0a4 + * Sat Jan 18 2025 Fedora Release Engineering - 3.14.0~a3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index e422e4c..d4cbdc0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Python-3.14.0a3.tar.xz) = e26c9736f00af680b5f1ff1ba0f06562c48550836088d79dd8b4c97016d52f9f76979de32fa8556e9d750a5dad488643e897807ab6cb0c1424882151fe5f3337 +SHA512 (Python-3.14.0a4.tar.xz) = b70671ebbd9f777fdcb661405c538c733600470ac34992a5b3df99d2f5afecc22cd8325eeec50eeef043181e634da91e535c166b9b5ed421d4e6aa41b79da3ab