From 38f8e7326279d9187736065852cb7651c774d582 Mon Sep 17 00:00:00 2001 From: Austin Lamb Date: Fri, 19 Feb 2021 15:27:01 -0800 Subject: [PATCH 1/2] [3.9] bpo-42825: Enable /OPT:REF (GH-24098) We explicitly disable /OPT:ICF as some manual optimisations depend on some functions still having distinct pointers (such as wrap_binary_func and wrap_binary_func_l). (cherry picked from commit b4af629f4d4868ef74ee298d66259fae78c7fd89) --- PCbuild/pyproject.props | 1 + 1 file changed, 1 insertion(+) diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props index 2b4be392da47ae6..d492b71dfbaa3d2 100644 --- a/PCbuild/pyproject.props +++ b/PCbuild/pyproject.props @@ -74,6 +74,7 @@ PGInstrument PGUpdate advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;%(AdditionalDependencies) + /OPT:REF,NOICF %(AdditionalOptions) true From d04e6658e19aceab307637944b57d0507bae973c Mon Sep 17 00:00:00 2001 From: icanhasmath Date: Thu, 29 Oct 2026 08:12:02 -0500 Subject: [PATCH 2/2] Update version to 3.9.25.3 and add release notes ActiveState release of the end-of-life 3.9 line: the bpo-42825 /OPT:REF,NOICF linker setting, so Windows builds made with Visual Studio 2022 keep wrap_binaryfunc and wrap_binaryfunc_l distinct. Co-Authored-By: Claude Opus 5.5 --- Doc/whatsnew/3.9.rst | 17 +++++++++++++++++ Include/patchlevel.h | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index a9e747a8c37e946..359e88d0b8bff76 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -1847,3 +1847,20 @@ tempfile a :exc:`PermissionError` is no longer masked by :exc:`NotADirectoryError` (:issue:`43153`), and cleanup no longer recurses endlessly when the temporary directory itself cannot be removed (:gh:`79325`). + + +Notable changes in 3.9.25.3 +=========================== + +This is an ActiveState release of the 3.9 line, on top of 3.9.25.2. + +Build Changes +------------- + +* Windows release builds now link with ``/OPT:REF,NOICF``. With identical + COMDAT folding enabled, newer Visual Studio linkers merge two internal slot + wrappers whose code is identical, and the type machinery relies on their + addresses being different. On such builds, ``+`` with an instance of a + subclass of a built-in type (for example an :class:`int` or + :class:`datetime.datetime` subclass) returned :data:`NotImplemented` + instead of raising :exc:`TypeError`. (Backport of :issue:`42825`.) diff --git a/Include/patchlevel.h b/Include/patchlevel.h index 988aba035a6fa8b..9db78558a0ceac4 100644 --- a/Include/patchlevel.h +++ b/Include/patchlevel.h @@ -23,7 +23,7 @@ #define PY_RELEASE_SERIAL 0 /* Version as a string */ -#define PY_VERSION "3.9.25.2" +#define PY_VERSION "3.9.25.3" /*--end constants--*/ /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.