From e9d507f8d353dbe8732082b277d63da5ccf83721 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Thu, 25 Jun 2026 11:43:16 +0000 Subject: [PATCH 01/30] Python 3.15.0b3 --- README.anaconda.md | 9 +- recipe/build_base.sh | 2 +- recipe/conda_build_config.yaml | 4 +- recipe/meta.yaml | 17 +- ...2-Change-FD_SETSIZE-from-512-to-2048.patch | 8 +- ...0002-Win32-Do-not-download-externals.patch | 12 +- ...-so-that-it-looks-in-sys.prefix-lib-.patch | 10 +- ...-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch | 12 +- recipe/patches/0005-Unvendor-openssl.patch | 88 +++--- recipe/patches/0006-Unvendor-sqlite3.patch | 8 +- ...dd-CondaEcosystemModifyDllSearchPath.patch | 12 +- recipe/patches/0008-Doing-d1trimfile.patch | 44 +-- ...009-Allow-cross-compiling-for-Darwin.patch | 12 +- .../patches/0010-Fix-TZPATH-on-windows.patch | 8 +- ...ch-work-with-SYSTEM_VERSION_COMPAT-1.patch | 8 +- recipe/patches/0012-Unvendor-bzip2.patch | 4 +- recipe/patches/0014-Unvendor-tcltk.patch | 26 +- recipe/patches/0015-unvendor-xz.patch | 4 +- recipe/patches/0016-unvendor-zlib.patch | 56 ++-- ...-not-pass-g-to-GCC-when-not-Py_DEBUG.patch | 14 +- recipe/patches/0018-Unvendor-expat.patch | 8 +- .../patches/0019-Remove-unused-readelf.patch | 6 +- .../0021-Override-configure-LIBFFI.patch | 8 +- recipe/patches/0022-Unvendor-libmpdec.patch | 14 +- recipe/patches/0023-branding.patch | 8 +- recipe/patches/0024-Unvendor-zlib-ng.patch | 20 +- recipe/patches/0025-Unvendor-zstd.patch | 4 +- recipe/run_test_py315.py | 275 ++++++++++++++++++ 28 files changed, 493 insertions(+), 208 deletions(-) create mode 100644 recipe/run_test_py315.py diff --git a/README.anaconda.md b/README.anaconda.md index ff819534f..e3deb1299 100644 --- a/README.anaconda.md +++ b/README.anaconda.md @@ -7,9 +7,8 @@ plan that you should follow. **On each supported platform do the following:** -1. Push your newly built python package to our testing channel (`c3i_test2`). -2. Create a new Conda environment using this new python version: `conda create -n test -c c3i_test2 python=VERSION` -3. Make sure interactive python works, and can import some built in modules (`re`, `math`, `os`): +1. Create a new Conda environment using this new python version: `conda create -n test python=VERSION` +2. Make sure interactive python works, and can import some built in modules (`re`, `math`, `os`): ``` $ python -i Python 3.8.8 (default, Apr 13 2021, 12:59:45) @@ -18,5 +17,5 @@ Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> ``` -4. Make sure that the standard http server doesn't throw errors: `python -m http.server --bind 127.0.0.1` -5. `conda-build` a python dependent package with this version of python. Good examples are `pyarrow` or `scipy`. +3. Make sure that the standard http server doesn't throw errors: `python -m http.server --bind 127.0.0.1` +4. `conda-build` a python dependent package with this version of python. Good examples are `pyarrow` or `scipy`. diff --git a/recipe/build_base.sh b/recipe/build_base.sh index 948f2031f..2cfa044bf 100644 --- a/recipe/build_base.sh +++ b/recipe/build_base.sh @@ -419,7 +419,7 @@ ln -s ${PREFIX}/bin/pydoc${VER} ${PREFIX}/bin/pydoc # Workaround for https://github.com/conda/conda/issues/10969 - # specifically for conda<=4.10 # https://github.com/conda/conda/issues/11423#issuecomment-1104253815 -ln -s ${PREFIX}/bin/python3.14 ${PREFIX}/bin/python3.1 +ln -s ${PREFIX}/bin/python${VER} ${PREFIX}/bin/python3.1 # Remove test data to save space # Though keep `support` as some things use that. diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 218f94944..b8c77e32c 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,9 +1,9 @@ python: - - 3.14 + - 3.15 python_impl: - cpython numpy: - - 2.3 + - 2.5 gil_type: - normal # Will be enabled as part of https://anaconda.atlassian.net/browse/PKG-5855 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 83a4f4c91..bab88012d 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ -{% set version = "3.14.6" %} -{% set dev = "" %} +{% set version = "3.15.0" %} +{% set dev = "b3" %} {% set dev_ = "" %} {% set ver2 = '.'.join(version.split('.')[0:2]) %} {% set ver2nd = ''.join(version.split('.')[0:2]) %} @@ -61,7 +61,7 @@ source: {% else %} - url: https://www.python.org/ftp/python/{{ version }}/Python-{{ version }}{{ dev }}.tar.xz # md5 from: https://www.python.org/downloads/release/python-{{ ver3nd }}/ - sha256: 143b1dddefaec3bd2e21e3b839b34a2b7fb9842272883c576420d605e9f30c63 + sha256: 6a935ae234a67e6549894373b0cfeb8361182d03b21442328ae9598ab7422127 {% endif %} patches: - patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch @@ -193,10 +193,10 @@ outputs: {% endif %} # https://github.com/python/cpython/blob/main/Tools/jit/README.md#installing-llvm: # "LLVM version 21 is the officially supported version" - - clang-19 # [not win] - - llvm-tools-19 # [not win] - - clang 19.* # [win] - - llvm-tools 19.* # [win] + - clang-21 # [not win] + - llvm-tools-21 # [not win] + - clang 21.* # [win] + - llvm-tools 21.* # [win] host: - bzip2 {{ bzip2 }} - sqlite {{ sqlite }} @@ -247,6 +247,7 @@ outputs: - tests/cython/* - tests/prefix-replacement/* - run_test.py + - run_test_py315.py commands: - echo on # [win] - set # [win] @@ -300,6 +301,8 @@ outputs: - popd - popd - python run_test.py + - export RUN_TEST_REQUIRE_315=1 && python run_test_py315.py # [unix] + - set RUN_TEST_REQUIRE_315=1 && python run_test_py315.py # [win] - test ! -f default.profraw # [osx] # Test workaround for https://github.com/conda/conda/issues/10969 - python3.1 --version # [unix] diff --git a/recipe/patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch b/recipe/patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch index e3643c654..08fa04245 100644 --- a/recipe/patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch +++ b/recipe/patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch @@ -1,4 +1,4 @@ -From 285d30e99ac555177c551c112798cc79720f676e Mon Sep 17 00:00:00 2001 +From f43869001705b6d14f777f1bdb7a6d53dd4edd96 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 16 Aug 2017 11:53:55 +0100 Subject: [PATCH 01/24] Win32: Change FD_SETSIZE from 512 to 2048 @@ -9,10 +9,10 @@ https://github.com/ContinuumIO/anaconda-issues/issues/1241 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c -index d234d504cb5..3856307c611 100644 +index 2c56dbc6a54..845ff4732ca 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c -@@ -44,7 +44,7 @@ +@@ -45,7 +45,7 @@ FD_SETSIZE higher before this; e.g., via compiler /D switch. */ #if defined(MS_WINDOWS) && !defined(FD_SETSIZE) @@ -22,5 +22,5 @@ index d234d504cb5..3856307c611 100644 #if defined(HAVE_POLL_H) -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0002-Win32-Do-not-download-externals.patch b/recipe/patches/0002-Win32-Do-not-download-externals.patch index b88ab17aa..d5c01c27d 100644 --- a/recipe/patches/0002-Win32-Do-not-download-externals.patch +++ b/recipe/patches/0002-Win32-Do-not-download-externals.patch @@ -1,4 +1,4 @@ -From 2e62556e56120f7b6d15ba97fdf8733deebb9ea9 Mon Sep 17 00:00:00 2001 +From 1faa47b5f8c0ca3aa98ee0e3bb317106458bd514 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Thu, 7 Sep 2017 11:35:47 +0100 Subject: [PATCH 02/24] Win32: Do not download externals @@ -8,18 +8,18 @@ Subject: [PATCH 02/24] Win32: Do not download externals 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PCbuild/build.bat b/PCbuild/build.bat -index 60235704886..867a352057f 100644 +index 9d2f032f5a9..f0629639913 100644 --- a/PCbuild/build.bat +++ b/PCbuild/build.bat -@@ -113,7 +113,7 @@ if "%IncludeSSL%"=="" set IncludeSSL=true +@@ -118,7 +118,7 @@ if "%IncludeSSL%"=="" set IncludeSSL=true if "%IncludeTkinter%"=="" set IncludeTkinter=true if "%UseJIT%" NEQ "true" set IncludeLLVM=false -if "%IncludeExternals%"=="true" call "%dir%get_externals.bat" +rem if "%IncludeExternals%"=="true" call "%dir%get_externals.bat" - if "%do_pgo%" EQU "true" if "%platf%" EQU "x64" ( - if "%PROCESSOR_ARCHITEW6432%" NEQ "AMD64" if "%PROCESSOR_ARCHITECTURE%" NEQ "AMD64" ( + if /I "%target%"=="Clean" set clean=true + if /I "%target%"=="CleanAll" set clean=true -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0003-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch b/recipe/patches/0003-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch index 8b861ae96..099d59367 100644 --- a/recipe/patches/0003-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch +++ b/recipe/patches/0003-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch @@ -1,4 +1,4 @@ -From c48a3c1cc321e00bd361f5fce271a18c03c4a202 Mon Sep 17 00:00:00 2001 +From 054ec3e5926c29850db8d0cae3aaebc2670bfccb Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 5 Dec 2017 22:47:59 +0000 Subject: [PATCH 03/24] Fix find_library so that it looks in sys.prefix/lib @@ -25,10 +25,10 @@ index 583c47daff3..ab9b01c87e2 100644 yield os.path.join(executable_path, name[len('@executable_path/'):]) diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py -index 378f12167c6..bf45580ab9f 100644 +index 35ac5b6bfd6..09c3e1703dc 100644 --- a/Lib/ctypes/util.py +++ b/Lib/ctypes/util.py -@@ -129,7 +129,8 @@ def dllist(): +@@ -136,7 +136,8 @@ def dllist(): elif os.name == "posix" and sys.platform in {"darwin", "ios", "tvos", "watchos"}: from ctypes.macholib.dyld import dyld_find as _dyld_find def find_library(name): @@ -38,7 +38,7 @@ index 378f12167c6..bf45580ab9f 100644 '%s.dylib' % name, '%s.framework/%s' % (name, name)] for name in possible: -@@ -430,10 +431,30 @@ def _findLib_ld(name): +@@ -437,10 +438,30 @@ def _findLib_ld(name): pass # result will be None return result @@ -72,5 +72,5 @@ index 378f12167c6..bf45580ab9f 100644 # Listing loaded libraries on other systems will try to use -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0004-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch b/recipe/patches/0004-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch index 7d9bc9c44..5762a5b21 100644 --- a/recipe/patches/0004-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch +++ b/recipe/patches/0004-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch @@ -1,4 +1,4 @@ -From 4435da9460f82ce6c96c4b92f58eab6edfc90da1 Mon Sep 17 00:00:00 2001 +From 41b486c6f4a3028836368f79711da6f5934f9386 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sat, 27 Oct 2018 18:48:30 +0100 Subject: [PATCH 04/24] Disable registry lookup unless CONDA_PY_ALLOW_REG_PATHS @@ -25,7 +25,7 @@ index 1e75993480a..ff96c8e1990 100644 !progname_to_dict(dict, "real_executable") || !library_to_dict(dict, "library") || diff --git a/Modules/getpath.py b/Modules/getpath.py -index b89d7427e3f..21df0efac12 100644 +index 6199567bd77..ea370c2f686 100644 --- a/Modules/getpath.py +++ b/Modules/getpath.py @@ -52,6 +52,7 @@ @@ -36,9 +36,9 @@ index b89d7427e3f..21df0efac12 100644 # ** Values calculated at runtime ** # config -- [in/out] dict of the PyConfig structure -@@ -704,7 +705,7 @@ def search_up(prefix, *landmarks, test=isfile): - else: - pythonpath.append(joinpath(base_prefix, ZIP_LANDMARK)) +@@ -699,7 +700,7 @@ def search_up(prefix, *landmarks, test=isfile): + stdlib_zip = joinpath(base_prefix, ZIP_LANDMARK) + pythonpath.append(stdlib_zip) - if os_name == 'nt' and use_environment and winreg: + if os_name == 'nt' and use_environment and winreg and ENV_CONDA_PY_ALLOW_REG_PATHS and ENV_CONDA_PY_ALLOW_REG_PATHS != '0': @@ -1197,5 +1197,5 @@ index 00000000000..a73ea8a0e91 + return hPython3 != NULL; +} -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0005-Unvendor-openssl.patch b/recipe/patches/0005-Unvendor-openssl.patch index 375f230ee..1cc08c36e 100644 --- a/recipe/patches/0005-Unvendor-openssl.patch +++ b/recipe/patches/0005-Unvendor-openssl.patch @@ -1,22 +1,22 @@ -From 04cfcc1728485e2fbdd04f1c34425e8377b72c61 Mon Sep 17 00:00:00 2001 -From: Nehal J Wani -Date: Sat, 24 Nov 2018 20:38:02 -0600 -Subject: [PATCH 05/24] Unvendor openssl - -Co-authored-by: Isuru Fernando ---- - PCbuild/openssl.props | 14 ++------------ - PCbuild/openssl.vcxproj | 32 -------------------------------- - PCbuild/python.props | 27 ++++++++++++++------------- - PCbuild/python.vcxproj | 3 +++ - PCbuild/pythonw.vcxproj | 3 +++ - 5 files changed, 22 insertions(+), 57 deletions(-) - -diff --git a/PCbuild/openssl.props b/PCbuild/openssl.props -index 5fd708b211e..044cefd95ea 100644 ---- a/PCbuild/openssl.props -+++ b/PCbuild/openssl.props -@@ -2,10 +2,10 @@ +From 0642618fc60bb673e0336ba43e0ac790d46b0913 Mon Sep 17 00:00:00 2001 +From: Nehal J Wani +Date: Sat, 24 Nov 2018 20:38:02 -0600 +Subject: [PATCH 05/24] Unvendor openssl + +Co-authored-by: Isuru Fernando +--- + PCbuild/openssl.props | 14 ++------------ + PCbuild/openssl.vcxproj | 32 -------------------------------- + PCbuild/python.props | 13 +------------ + PCbuild/python.vcxproj | 3 +++ + PCbuild/pythonw.vcxproj | 3 +++ + 5 files changed, 9 insertions(+), 56 deletions(-) + +diff --git a/PCbuild/openssl.props b/PCbuild/openssl.props +index 5fd708b211e..044cefd95ea 100644 +--- a/PCbuild/openssl.props ++++ b/PCbuild/openssl.props +@@ -2,10 +2,10 @@ @@ -29,7 +29,7 @@ index 5fd708b211e..044cefd95ea 100644 ws2_32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies) -@@ -21,14 +21,4 @@ +@@ -21,14 +21,4 @@ <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).dll" /> <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).pdb" /> @@ -44,11 +44,11 @@ index 5fd708b211e..044cefd95ea 100644 - - -diff --git a/PCbuild/openssl.vcxproj b/PCbuild/openssl.vcxproj -index 7ca750dda8f..17eee400ebb 100644 ---- a/PCbuild/openssl.vcxproj -+++ b/PCbuild/openssl.vcxproj -@@ -60,40 +60,8 @@ +diff --git a/PCbuild/openssl.vcxproj b/PCbuild/openssl.vcxproj +index 7ca750dda8f..17eee400ebb 100644 +--- a/PCbuild/openssl.vcxproj ++++ b/PCbuild/openssl.vcxproj +@@ -60,40 +60,8 @@ @@ -89,11 +89,11 @@ index 7ca750dda8f..17eee400ebb 100644 -diff --git a/PCbuild/python.props b/PCbuild/python.props -index ce4a7781fbd..253aa66f477 100644 ---- a/PCbuild/python.props -+++ b/PCbuild/python.props -@@ -68,6 +68,7 @@ +diff --git a/PCbuild/python.props b/PCbuild/python.props +index 8d931bba28a..744ce0c540a 100644 +--- a/PCbuild/python.props ++++ b/PCbuild/python.props +@@ -91,6 +91,7 @@ $(EXTERNALS_DIR) @@ -101,13 +101,13 @@ index ce4a7781fbd..253aa66f477 100644 $([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`)) $(ExternalsDir)\ -@@ -75,20 +76,8 @@ +@@ -98,20 +99,8 @@ -- $(ExternalsDir)sqlite-3.50.4.0\ +- $(ExternalsDir)sqlite-3.53.2.0\ - $(ExternalsDir)bzip2-1.0.8\ -- $(ExternalsDir)xz-5.2.5\ +- $(ExternalsDir)xz-5.8.1.1\ - $(ExternalsDir)libffi-3.4.4\ - $(libffiDir)$(ArchName)\ - $(libffiOutDir)include @@ -122,11 +122,11 @@ index ce4a7781fbd..253aa66f477 100644 -diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj -index 70dabaa3c8b..255be6ab910 100644 ---- a/PCbuild/python.vcxproj -+++ b/PCbuild/python.vcxproj -@@ -110,6 +110,9 @@ +diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj +index 417ede34c54..c73404ad2ad 100644 +--- a/PCbuild/python.vcxproj ++++ b/PCbuild/python.vcxproj +@@ -110,6 +110,9 @@ @@ -136,11 +136,11 @@ index 70dabaa3c8b..255be6ab910 100644 -diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj -index c6a5b8ce90a..8645a7bf438 100644 ---- a/PCbuild/pythonw.vcxproj -+++ b/PCbuild/pythonw.vcxproj -@@ -105,6 +105,9 @@ +diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj +index 244cdf622ad..03376ab24fd 100644 +--- a/PCbuild/pythonw.vcxproj ++++ b/PCbuild/pythonw.vcxproj +@@ -105,6 +105,9 @@ @@ -151,5 +151,5 @@ index c6a5b8ce90a..8645a7bf438 100644 -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0006-Unvendor-sqlite3.patch b/recipe/patches/0006-Unvendor-sqlite3.patch index ca5009ef4..367597027 100644 --- a/recipe/patches/0006-Unvendor-sqlite3.patch +++ b/recipe/patches/0006-Unvendor-sqlite3.patch @@ -1,4 +1,4 @@ -From d5656337151f4e876436e7baa7dc01b4f907c5b6 Mon Sep 17 00:00:00 2001 +From 3f1f9787e7e3a15dd7e490666d338fd4aaf9ed5f Mon Sep 17 00:00:00 2001 From: Nehal J Wani Date: Tue, 5 Oct 2021 12:42:06 -0700 Subject: [PATCH 06/24] Unvendor sqlite3 @@ -39,10 +39,10 @@ index 9ae0a0fc3a0..9baaafed518 100644 diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln -index 7296ea75301..a7f716ff105 100644 +index 09a989d3864..086ca1132c0 100644 --- a/PCbuild/pcbuild.sln +++ b/PCbuild/pcbuild.sln -@@ -98,8 +98,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcxproj" +@@ -99,8 +99,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcxproj" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcxproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}" EndProject @@ -75,5 +75,5 @@ index f12ec348b37..f9e5e449a49 100644 -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0007-Add-CondaEcosystemModifyDllSearchPath.patch b/recipe/patches/0007-Add-CondaEcosystemModifyDllSearchPath.patch index a30d498dc..3c3f7f140 100644 --- a/recipe/patches/0007-Add-CondaEcosystemModifyDllSearchPath.patch +++ b/recipe/patches/0007-Add-CondaEcosystemModifyDllSearchPath.patch @@ -1,4 +1,4 @@ -From 9acbf2d73db9c5cbca2c31d913411994b809cf89 Mon Sep 17 00:00:00 2001 +From 9ecc3565406cd6fb0c9d1c8844e5612a2cd434d2 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 24 Dec 2019 18:37:17 +0100 Subject: [PATCH 07/24] Add CondaEcosystemModifyDllSearchPath() @@ -33,10 +33,10 @@ Co-authored-by: Isuru Fernando 1 file changed, 95 insertions(+) diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c -index 352787c6495..4fd4fcb0f6e 100644 +index 3933c321ed2..9a4a8c5a024 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c -@@ -80,6 +80,10 @@ +@@ -88,6 +88,10 @@ #ifdef MS_WINDOWS # undef BYTE @@ -47,7 +47,7 @@ index 352787c6495..4fd4fcb0f6e 100644 #endif #define PUTS(fd, str) (void)_Py_write_noraise(fd, str, (int)strlen(str)) -@@ -114,6 +118,93 @@ GENERATE_DEBUG_SECTION(PyRuntime, _PyRuntimeState _PyRuntime) +@@ -122,6 +126,93 @@ GENERATE_DEBUG_SECTION(PyRuntime, _PyRuntimeState _PyRuntime) = _PyRuntimeState_INIT(_PyRuntime, _Py_Debug_Cookie); _Py_COMP_DIAG_POP @@ -141,7 +141,7 @@ index 352787c6495..4fd4fcb0f6e 100644 static int runtime_initialized = 0; -@@ -131,6 +222,10 @@ _PyRuntime_Initialize(void) +@@ -139,6 +230,10 @@ _PyRuntime_Initialize(void) } runtime_initialized = 1; @@ -153,5 +153,5 @@ index 352787c6495..4fd4fcb0f6e 100644 } -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0008-Doing-d1trimfile.patch b/recipe/patches/0008-Doing-d1trimfile.patch index 74b90e347..4632271ea 100644 --- a/recipe/patches/0008-Doing-d1trimfile.patch +++ b/recipe/patches/0008-Doing-d1trimfile.patch @@ -1,4 +1,4 @@ -From 6250a23c4f7ca2373a6f3208deaaf1cc26f12eb5 Mon Sep 17 00:00:00 2001 +From 8f9b456a08af486bc5a7309a173fdeca29cf0b2c Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 31 Dec 2019 21:47:47 +0100 Subject: [PATCH 08/24] Doing d1trimfile @@ -140,7 +140,7 @@ index f15b80852e3..e565441ca4c 100644 diff --git a/PCbuild/_decimal.vcxproj b/PCbuild/_decimal.vcxproj -index ee7421484b5..e9d60b4db1a 100644 +index 3ba49370d58..921d22e47b3 100644 --- a/PCbuild/_decimal.vcxproj +++ b/PCbuild/_decimal.vcxproj @@ -99,6 +99,10 @@ @@ -172,7 +172,7 @@ index 3eb9c89bcb6..920656f2ee2 100644 diff --git a/PCbuild/_freeze_module.vcxproj b/PCbuild/_freeze_module.vcxproj -index 5ceddf759b8..6b113ad8c2e 100644 +index 17b98c9d9ec..b3998a47f22 100644 --- a/PCbuild/_freeze_module.vcxproj +++ b/PCbuild/_freeze_module.vcxproj @@ -93,6 +93,10 @@ @@ -394,7 +394,7 @@ index 4e721e8ce09..048adde0951 100644 diff --git a/PCbuild/_testcapi.vcxproj b/PCbuild/_testcapi.vcxproj -index a68f15d25aa..5c42f15c312 100644 +index 64e50b67be4..83233bfe869 100644 --- a/PCbuild/_testcapi.vcxproj +++ b/PCbuild/_testcapi.vcxproj @@ -92,6 +92,26 @@ @@ -486,7 +486,7 @@ index c35ac83c1c7..c9d7f5d22b7 100644 diff --git a/PCbuild/_testinternalcapi.vcxproj b/PCbuild/_testinternalcapi.vcxproj -index f7e050b7c74..58c3e10c0f0 100644 +index f3e423fa046..ac285717998 100644 --- a/PCbuild/_testinternalcapi.vcxproj +++ b/PCbuild/_testinternalcapi.vcxproj @@ -92,6 +92,26 @@ @@ -547,11 +547,11 @@ index 87f6005fffc..de9358312ac 100644 $(tcltkLib);%(AdditionalDependencies) diff --git a/PCbuild/liblzma.vcxproj b/PCbuild/liblzma.vcxproj -index 97938692328..64b1d443cfa 100644 +index 75d4e162346..f54587584b0 100644 --- a/PCbuild/liblzma.vcxproj +++ b/PCbuild/liblzma.vcxproj @@ -95,6 +95,11 @@ - $(lzmaDir)windows/vs2019;$(lzmaDir)src/liblzma/common;$(lzmaDir)src/common;$(lzmaDir)src/liblzma/api;$(lzmaDir)src/liblzma/check;$(lzmaDir)src/liblzma/delta;$(lzmaDir)src/liblzma/lz;$(lzmaDir)src/liblzma/lzma;$(lzmaDir)src/liblzma/rangecoder;$(lzmaDir)src/liblzma/simple;%(AdditionalIncludeDirectories) + $(lzmaDir)windows;$(lzmaDir)src/liblzma/common;$(lzmaDir)src/common;$(lzmaDir)src/liblzma/api;$(lzmaDir)src/liblzma/check;$(lzmaDir)src/liblzma/delta;$(lzmaDir)src/liblzma/lz;$(lzmaDir)src/liblzma/lzma;$(lzmaDir)src/liblzma/rangecoder;$(lzmaDir)src/liblzma/simple;%(AdditionalIncludeDirectories) 4244;4267;4996;%(DisableSpecificWarnings) %(AdditionalOptions) -Wno-deprecated-declarations + 4028;4113;4133;4244;4267;4996;%(DisableSpecificWarnings) @@ -563,13 +563,13 @@ index 97938692328..64b1d443cfa 100644 diff --git a/PCbuild/pyexpat.vcxproj b/PCbuild/pyexpat.vcxproj -index dc9161a8b29..3bcef600a3e 100644 +index 8e0f5f63112..7a1d5942a6c 100644 --- a/PCbuild/pyexpat.vcxproj +++ b/PCbuild/pyexpat.vcxproj @@ -92,6 +92,10 @@ $(PySourcePath)Modules\expat;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;PYEXPAT_EXPORTS;XML_STATIC;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;XML_STATIC;%(PreprocessorDefinitions) + /d1trimfile:%SRC_DIR% + /d1trimfile:%SRC_DIR% + /d1trimfile:%SRC_DIR% @@ -608,7 +608,7 @@ index ea432d6bc9a..13bc6921030 100644 version.lib;shlwapi.lib;%(AdditionalDependencies) diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj -index 255be6ab910..08c5c877d81 100644 +index c73404ad2ad..30312dd6384 100644 --- a/PCbuild/python.vcxproj +++ b/PCbuild/python.vcxproj @@ -92,6 +92,10 @@ @@ -623,7 +623,7 @@ index 255be6ab910..08c5c877d81 100644 Console diff --git a/PCbuild/python3dll.vcxproj b/PCbuild/python3dll.vcxproj -index 235ea1cf9d3..60cafdbb5db 100644 +index 3d8ac1b2353..8f8da3d0bb0 100644 --- a/PCbuild/python3dll.vcxproj +++ b/PCbuild/python3dll.vcxproj @@ -93,6 +93,10 @@ @@ -651,7 +651,7 @@ index 3f8772d30b4..d80968e351a 100644 windowsapp.lib;%(AdditionalDependencies) diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj -index b911c938563..11c2bd350a8 100644 +index e255ed5af19..b455b3089ca 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -99,11 +99,11 @@ @@ -670,7 +670,7 @@ index b911c938563..11c2bd350a8 100644 _Py_JIT;%(PreprocessorDefinitions) _Py_TIER2=$(UseTIER2);%(PreprocessorDefinitions) diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj -index 8645a7bf438..345ef48dfe2 100644 +index 03376ab24fd..6437dfa6a90 100644 --- a/PCbuild/pythonw.vcxproj +++ b/PCbuild/pythonw.vcxproj @@ -96,6 +96,18 @@ @@ -775,12 +775,12 @@ index 781f938e2ab..714a2382c1e 100644 diff --git a/PCbuild/venvlauncher.vcxproj b/PCbuild/venvlauncher.vcxproj -index abaf3a979af..324aadcd782 100644 +index a2e8ffa82b1..705e507050f 100644 --- a/PCbuild/venvlauncher.vcxproj +++ b/PCbuild/venvlauncher.vcxproj -@@ -94,6 +94,10 @@ +@@ -97,6 +97,10 @@ - EXENAME=L"$(PyExeName)$(PyDebugExt).exe";_CONSOLE;%(PreprocessorDefinitions) + EXENAME=L"$(ExeName)";_CONSOLE;%(PreprocessorDefinitions) MultiThreaded + /d1trimfile:%SRC_DIR% + /d1trimfile:%SRC_DIR% @@ -790,12 +790,12 @@ index abaf3a979af..324aadcd782 100644 PY_ICON;%(PreprocessorDefinitions) diff --git a/PCbuild/venvwlauncher.vcxproj b/PCbuild/venvwlauncher.vcxproj -index c58280deb8a..4dacf7f2724 100644 +index f2aaf83fe2b..d9c47683f25 100644 --- a/PCbuild/venvwlauncher.vcxproj +++ b/PCbuild/venvwlauncher.vcxproj -@@ -94,6 +94,10 @@ +@@ -97,6 +97,10 @@ - EXENAME=L"$(PyWExeName)$(PyDebugExt).exe";_WINDOWS;%(PreprocessorDefinitions) + EXENAME=L"$(ExeName)";_WINDOWS;%(PreprocessorDefinitions) MultiThreaded + /d1trimfile:%SRC_DIR% + /d1trimfile:%SRC_DIR% @@ -828,7 +828,7 @@ index c26029b15a3..d76a3fb8537 100644 diff --git a/PCbuild/xxlimited.vcxproj b/PCbuild/xxlimited.vcxproj -index 093e6920c0b..19dd43c19c2 100644 +index f0c36166001..cc906a14cf4 100644 --- a/PCbuild/xxlimited.vcxproj +++ b/PCbuild/xxlimited.vcxproj @@ -93,6 +93,12 @@ @@ -845,7 +845,7 @@ index 093e6920c0b..19dd43c19c2 100644 wsock32.lib;%(AdditionalDependencies) diff --git a/PCbuild/xxlimited_35.vcxproj b/PCbuild/xxlimited_35.vcxproj -index 3f4d4463f24..2572449ba0c 100644 +index bfaf4e25366..4f8a3b37e35 100644 --- a/PCbuild/xxlimited_35.vcxproj +++ b/PCbuild/xxlimited_35.vcxproj @@ -93,6 +93,12 @@ @@ -862,5 +862,5 @@ index 3f4d4463f24..2572449ba0c 100644 wsock32.lib;%(AdditionalDependencies) -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0009-Allow-cross-compiling-for-Darwin.patch b/recipe/patches/0009-Allow-cross-compiling-for-Darwin.patch index 8d56eff84..abbfc33a3 100644 --- a/recipe/patches/0009-Allow-cross-compiling-for-Darwin.patch +++ b/recipe/patches/0009-Allow-cross-compiling-for-Darwin.patch @@ -1,4 +1,4 @@ -From a2054d6e5d86c729547a5e23ef1509f70565c4a3 Mon Sep 17 00:00:00 2001 +From d91f0d65d9c9d1112cc44bfa30fad26f8379873c Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 26 Nov 2020 18:47:37 +0000 Subject: [PATCH 09/24] Allow cross compiling for Darwin @@ -9,10 +9,10 @@ Subject: [PATCH 09/24] Allow cross compiling for Darwin 2 files changed, 6 insertions(+) diff --git a/configure b/configure -index d31c24dffa2..63aba6d8004 100755 +index e60a71cff46..663ac7a6492 100755 --- a/configure +++ b/configure -@@ -4110,6 +4110,9 @@ then +@@ -4155,6 +4155,9 @@ then *-*-linux*) ac_sys_system=Linux ;; @@ -23,10 +23,10 @@ index d31c24dffa2..63aba6d8004 100755 ac_sys_system=Cygwin ;; diff --git a/configure.ac b/configure.ac -index af7a9623d7b..5f6a0622f37 100644 +index c6485093032..3f18cd6ab3a 100644 --- a/configure.ac +++ b/configure.ac -@@ -324,6 +324,9 @@ then +@@ -333,6 +333,9 @@ then *-*-linux*) ac_sys_system=Linux ;; @@ -37,5 +37,5 @@ index af7a9623d7b..5f6a0622f37 100644 ac_sys_system=Cygwin ;; -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0010-Fix-TZPATH-on-windows.patch b/recipe/patches/0010-Fix-TZPATH-on-windows.patch index a64802dcc..5c3473ad2 100644 --- a/recipe/patches/0010-Fix-TZPATH-on-windows.patch +++ b/recipe/patches/0010-Fix-TZPATH-on-windows.patch @@ -1,4 +1,4 @@ -From 6a6f59eed43a4ef714df3b63a9d640f5c5c99ea3 Mon Sep 17 00:00:00 2001 +From 6c068469e0422e69e53b589fcb73aca7d429eb94 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 7 Oct 2020 10:08:30 -0500 Subject: [PATCH 10/24] Fix TZPATH on windows @@ -8,10 +8,10 @@ Subject: [PATCH 10/24] Fix TZPATH on windows 1 file changed, 1 insertion(+) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index 2ecbff222fe..54d37a5d4e7 100644 +index 47415adce04..78659c358db 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py -@@ -555,6 +555,7 @@ def _init_config_vars(): +@@ -550,6 +550,7 @@ def _init_config_vars(): if os.name == 'nt': _init_non_posix(_CONFIG_VARS) _CONFIG_VARS['VPATH'] = sys._vpath @@ -20,5 +20,5 @@ index 2ecbff222fe..54d37a5d4e7 100644 # Setting 'userbase' is done below the call to the # init function to enable using 'get_config_var' in -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0011-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch b/recipe/patches/0011-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch index 0180a21ca..248041b48 100644 --- a/recipe/patches/0011-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch +++ b/recipe/patches/0011-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch @@ -1,4 +1,4 @@ -From 5184883c466b51542757b62ef0450081b69e5851 Mon Sep 17 00:00:00 2001 +From 95e5c05333231ac6e321129154417c777f95df3d Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 25 Jan 2021 03:28:08 -0600 Subject: [PATCH 11/24] Make dyld search work with SYSTEM_VERSION_COMPAT=1 @@ -15,10 +15,10 @@ as that part is compiled with `MACOSX_DEPLOYMENT_TARGET=11.0`) 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c -index 856b0376e5e..2c09548ec1c 100644 +index ccc57e347b0..427b9094799 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c -@@ -1509,7 +1509,7 @@ copy_com_pointer(PyObject *self, PyObject *args) +@@ -1503,7 +1503,7 @@ copy_com_pointer(PyObject *self, PyObject *args) #ifdef HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH # ifdef HAVE_BUILTIN_AVAILABLE # define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH_RUNTIME \ @@ -28,5 +28,5 @@ index 856b0376e5e..2c09548ec1c 100644 # define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH_RUNTIME \ (_dyld_shared_cache_contains_path != NULL) -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0012-Unvendor-bzip2.patch b/recipe/patches/0012-Unvendor-bzip2.patch index 278641050..27428ad4c 100644 --- a/recipe/patches/0012-Unvendor-bzip2.patch +++ b/recipe/patches/0012-Unvendor-bzip2.patch @@ -1,4 +1,4 @@ -From a81d1c7ec4be590e394231631a2ae89ca8d6da24 Mon Sep 17 00:00:00 2001 +From 462162f918d70db105d620fce75f3a4163dbf205 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 16 Aug 2021 02:56:27 -0700 Subject: [PATCH 12/24] Unvendor bzip2 @@ -86,5 +86,5 @@ index 7c0b5162537..c1f960608c3 100644 -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0014-Unvendor-tcltk.patch b/recipe/patches/0014-Unvendor-tcltk.patch index 1868adffc..75ce05477 100644 --- a/recipe/patches/0014-Unvendor-tcltk.patch +++ b/recipe/patches/0014-Unvendor-tcltk.patch @@ -1,12 +1,12 @@ -From 8d3b4da5f463d6f5b4aa0f92a9c5f4ffe35be6f9 Mon Sep 17 00:00:00 2001 +From 0c88a8e5d9673742d74fb5b4be8ad45c33f1f43f Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 20 Aug 2021 10:23:51 -0700 Subject: [PATCH 14/24] Unvendor tcltk --- PCbuild/_tkinter.vcxproj | 6 ------ - PCbuild/tcltk.props | 6 +++--- - 2 files changed, 3 insertions(+), 9 deletions(-) + PCbuild/tcltk.props | 9 +++------ + 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/PCbuild/_tkinter.vcxproj b/PCbuild/_tkinter.vcxproj index de9358312ac..3fe2c29c823 100644 @@ -26,22 +26,28 @@ index de9358312ac..3fe2c29c823 100644 diff --git a/PCbuild/tcltk.props b/PCbuild/tcltk.props -index d26b36ba98e..4780ff5e531 100644 +index 28e8c0db4d1..537de0e5e38 100644 --- a/PCbuild/tcltk.props +++ b/PCbuild/tcltk.props -@@ -12,9 +12,9 @@ +@@ -12,15 +12,12 @@ $([System.Version]::Parse($(TkVersion)).Minor) $([System.Version]::Parse($(TkVersion)).Build) $([System.Version]::Parse($(TkVersion)).Revision) -- $(ExternalsDir)tcl-core-$(TclVersion)\ +- +- $(ExternalsDir)tcl-core-$(TclVersion)\ +- $(ExternalsDir)tcl-$(TclVersion)\ - $(ExternalsDir)tk-$(TkVersion)\ - $(ExternalsDir)tcltk-$(TclVersion)\$(ArchName)\ + $(condaDir) + $(condaDir) + $(condaDir) - $(tcltkDir)\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)t.exe - $(tcltkDir)\..\win32\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)t.exe - TCL_WITH_EXTERNAL_TOMMATH; + t + tcl9 + TCLSH_NATIVE="$(tcltkDir)\..\win32\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)$(tcltkSuffix).exe" +- TCL_WITH_EXTERNAL_TOMMATH; + + + tcl$(TclMajorVersion)$(TclMinorVersion)$(tcltkSuffix)$(TclDebugExt).dll -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0015-unvendor-xz.patch b/recipe/patches/0015-unvendor-xz.patch index f6a8395dc..bfe27954c 100644 --- a/recipe/patches/0015-unvendor-xz.patch +++ b/recipe/patches/0015-unvendor-xz.patch @@ -1,4 +1,4 @@ -From 0d87367978eb9f511608eeaa4fb0cda4ca3f6c80 Mon Sep 17 00:00:00 2001 +From 00a319e99bc9a8beaa1c585e3037885dc16cb58a Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 25 Sep 2021 10:07:05 -0700 Subject: [PATCH 15/24] unvendor xz @@ -42,5 +42,5 @@ index 321f41d8d27..6811fd1709e 100644 -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0016-unvendor-zlib.patch b/recipe/patches/0016-unvendor-zlib.patch index 2460a1742..222fd8eff 100644 --- a/recipe/patches/0016-unvendor-zlib.patch +++ b/recipe/patches/0016-unvendor-zlib.patch @@ -1,18 +1,18 @@ -From 34087fc34c8ec23a753abc13dac9de38a64f114c Mon Sep 17 00:00:00 2001 -From: Isuru Fernando -Date: Wed, 29 Sep 2021 15:21:55 -0700 -Subject: [PATCH 16/24] unvendor zlib - ---- - PCbuild/pythoncore.vcxproj | 8 ++-- - PCbuild/pythoncore.vcxproj.filters | 66 ------------------------------ - 2 files changed, 4 insertions(+), 70 deletions(-) - -diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj -index 11c2bd350a8..4471986b104 100644 ---- a/PCbuild/pythoncore.vcxproj -+++ b/PCbuild/pythoncore.vcxproj -@@ -82,7 +82,7 @@ +From bf303d3b27688d62fe6a55fe7e32ee6c54b8d670 Mon Sep 17 00:00:00 2001 +From: Isuru Fernando +Date: Wed, 29 Sep 2021 15:21:55 -0700 +Subject: [PATCH 16/24] unvendor zlib + +--- + PCbuild/pythoncore.vcxproj | 8 ++-- + PCbuild/pythoncore.vcxproj.filters | 66 ------------------------------ + 2 files changed, 4 insertions(+), 70 deletions(-) + +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index b455b3089ca..00e29eae266 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -82,7 +82,7 @@ true true @@ -21,7 +21,7 @@ index 11c2bd350a8..4471986b104 100644 false -@@ -101,7 +101,7 @@ +@@ -101,7 +101,7 @@ /d1trimfile:%SRC_DIR% $(PySourcePath)Modules\_hacl;$(PySourcePath)Modules\_hacl\include;$(PySourcePath)Python;%(AdditionalIncludeDirectories) @@ -30,22 +30,22 @@ index 11c2bd350a8..4471986b104 100644 $(GeneratedJitStencilsDir);%(AdditionalIncludeDirectories) _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) _Py_HAVE_ZLIB;%(PreprocessorDefinitions) -@@ -112,8 +112,8 @@ - Py_REMOTE_DEBUG;%(PreprocessorDefinitions) +@@ -113,8 +113,8 @@ + Py_STACKREF_DEBUG;%(PreprocessorDefinitions) - version.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;%(AdditionalDependencies) - zlib-ng$(PyDebugExt).lib;%(AdditionalDependencies) + version.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;zlib.lib;%(AdditionalDependencies) + $(condaDir)\lib;%(AdditionalLibraryDirectories) - - - -diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters -index 0e6d42cc959..144a0e3425a 100644 ---- a/PCbuild/pythoncore.vcxproj.filters -+++ b/PCbuild/pythoncore.vcxproj.filters -@@ -900,39 +900,6 @@ + $(GeneratedJitStencilsDir)jit_shim-aarch64-pc-windows-msvc.o;%(AdditionalDependencies) + $(GeneratedJitStencilsDir)jit_shim-i686-pc-windows-msvc.o;%(AdditionalDependencies) + $(GeneratedJitStencilsDir)jit_shim-x86_64-pc-windows-msvc.o;%(AdditionalDependencies) +diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters +index 649ee1859ff..6fb1a6b5d0f 100644 +--- a/PCbuild/pythoncore.vcxproj.filters ++++ b/PCbuild/pythoncore.vcxproj.filters +@@ -939,39 +939,6 @@ Include\internal\mimalloc @@ -85,7 +85,7 @@ index 0e6d42cc959..144a0e3425a 100644 Include\internal -@@ -1580,39 +1547,6 @@ +@@ -1643,39 +1610,6 @@ Objects @@ -126,5 +126,5 @@ index 0e6d42cc959..144a0e3425a 100644 Python -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0017-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch b/recipe/patches/0017-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch index 12e60cd12..00ff055ae 100644 --- a/recipe/patches/0017-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch +++ b/recipe/patches/0017-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch @@ -1,4 +1,4 @@ -From 6082d63f085f4680e030064edebaf7961748d193 Mon Sep 17 00:00:00 2001 +From cf5576446283f275f93e253e7fb591aed3707189 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 16 Aug 2017 11:45:28 +0100 Subject: [PATCH 17/24] Do not pass -g to GCC when not Py_DEBUG @@ -10,10 +10,10 @@ This bloats our exe and our modules a lot. 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure -index 63aba6d8004..6c1442c2ec9 100755 +index 663ac7a6492..8ce2ebda6da 100755 --- a/configure +++ b/configure -@@ -5791,9 +5791,9 @@ if test $ac_test_CFLAGS; then +@@ -5842,9 +5842,9 @@ if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -25,7 +25,7 @@ index 63aba6d8004..6c1442c2ec9 100755 fi else if test "$GCC" = yes; then -@@ -9569,7 +9569,7 @@ then +@@ -9755,7 +9755,7 @@ then if test "$Py_DEBUG" = 'true' ; then OPT="-g $PYDEBUG_CFLAGS -Wall" else @@ -35,10 +35,10 @@ index 63aba6d8004..6c1442c2ec9 100755 ;; *) diff --git a/configure.ac b/configure.ac -index 5f6a0622f37..833dbb9ab37 100644 +index 3f18cd6ab3a..6e4abae8132 100644 --- a/configure.ac +++ b/configure.ac -@@ -2303,7 +2303,7 @@ then +@@ -2373,7 +2373,7 @@ then if test "$Py_DEBUG" = 'true' ; then OPT="-g $PYDEBUG_CFLAGS -Wall" else @@ -48,5 +48,5 @@ index 5f6a0622f37..833dbb9ab37 100644 ;; *) -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0018-Unvendor-expat.patch b/recipe/patches/0018-Unvendor-expat.patch index a29e84af2..7a5d07335 100644 --- a/recipe/patches/0018-Unvendor-expat.patch +++ b/recipe/patches/0018-Unvendor-expat.patch @@ -1,4 +1,4 @@ -From 0d33ad70420716d95eff93837a6d64744b5a0035 Mon Sep 17 00:00:00 2001 +From 77a6a33ce873eadbd540b1aa16b5b7fa8d0f1bd0 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 29 Mar 2023 23:07:10 -0500 Subject: [PATCH 18/24] Unvendor expat @@ -123,7 +123,7 @@ index a5368024cce..88a13faa683 100644 diff --git a/PCbuild/pyexpat.vcxproj b/PCbuild/pyexpat.vcxproj -index 3bcef600a3e..ec5d4b64b3c 100644 +index 7a1d5942a6c..8bc1bcec7e8 100644 --- a/PCbuild/pyexpat.vcxproj +++ b/PCbuild/pyexpat.vcxproj @@ -90,23 +90,19 @@ @@ -132,7 +132,7 @@ index 3bcef600a3e..ec5d4b64b3c 100644 - $(PySourcePath)Modules\expat;%(AdditionalIncludeDirectories) + $(condaDir)\include;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;PYEXPAT_EXPORTS;XML_STATIC;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;XML_STATIC;%(PreprocessorDefinitions) /d1trimfile:%SRC_DIR% /d1trimfile:%SRC_DIR% /d1trimfile:%SRC_DIR% @@ -187,5 +187,5 @@ index fd22fc8c477..b8280b4049c 100644 -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0019-Remove-unused-readelf.patch b/recipe/patches/0019-Remove-unused-readelf.patch index 796641d9a..a6c57c7ec 100644 --- a/recipe/patches/0019-Remove-unused-readelf.patch +++ b/recipe/patches/0019-Remove-unused-readelf.patch @@ -1,4 +1,4 @@ -From 1cfc9dbb8f45be390523550a44a4d74e8a0cb0ff Mon Sep 17 00:00:00 2001 +From 1460dc7fd5e7a85d29f86839284d47599cfb9265 Mon Sep 17 00:00:00 2001 From: Charles Bousseau Date: Thu, 25 May 2023 17:56:53 -0400 Subject: [PATCH 19/24] Remove unused readelf @@ -15,7 +15,7 @@ Drop unused build dependency on ``readelf``. 1 file changed, 1 deletion(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index ba039794c88..7b0d6dced64 100644 +index e411160d3ba..a0c062146c8 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -38,7 +38,6 @@ CC= @CC@ @@ -27,5 +27,5 @@ index ba039794c88..7b0d6dced64 100644 ABIFLAGS= @ABIFLAGS@ ABI_THREAD= @ABI_THREAD@ -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0021-Override-configure-LIBFFI.patch b/recipe/patches/0021-Override-configure-LIBFFI.patch index 4495bcb9f..5228dc08e 100644 --- a/recipe/patches/0021-Override-configure-LIBFFI.patch +++ b/recipe/patches/0021-Override-configure-LIBFFI.patch @@ -1,4 +1,4 @@ -From 19ebe8a84f6e6c94b4d4310b995c0b35e21a1fda Mon Sep 17 00:00:00 2001 +From 176436b01861649d8b02a47e24e557c77c217a1a Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 5 Sep 2023 21:51:31 +0200 Subject: [PATCH 20/24] Override configure LIBFFI @@ -8,10 +8,10 @@ Subject: [PATCH 20/24] Override configure LIBFFI 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure -index 6c1442c2ec9..c36afd583db 100755 +index 8ce2ebda6da..798a1e69141 100755 --- a/configure +++ b/configure -@@ -15248,7 +15248,7 @@ if test "x$ac_cv_lib_ffi_ffi_call" = xyes +@@ -15904,7 +15904,7 @@ if test "x$ac_cv_lib_ffi_ffi_call" = xyes then : have_libffi=yes @@ -21,5 +21,5 @@ index 6c1442c2ec9..c36afd583db 100755 fi -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0022-Unvendor-libmpdec.patch b/recipe/patches/0022-Unvendor-libmpdec.patch index 13b72c252..7d971b587 100644 --- a/recipe/patches/0022-Unvendor-libmpdec.patch +++ b/recipe/patches/0022-Unvendor-libmpdec.patch @@ -1,17 +1,17 @@ -From daee1afe1630439904567d756fc6afb4de8ea4c4 Mon Sep 17 00:00:00 2001 +From a93336b239983227c6549ec1ede266b769f8a999 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 16 Aug 2024 21:34:43 -0500 Subject: [PATCH 21/24] Unvendor libmpdec --- - PCbuild/_decimal.vcxproj | 50 +++++----------------------------------- - 1 file changed, 6 insertions(+), 44 deletions(-) + PCbuild/_decimal.vcxproj | 51 ++++++---------------------------------- + 1 file changed, 7 insertions(+), 44 deletions(-) diff --git a/PCbuild/_decimal.vcxproj b/PCbuild/_decimal.vcxproj -index e9d60b4db1a..0f49d7923f5 100644 +index 921d22e47b3..0f49d7923f5 100644 --- a/PCbuild/_decimal.vcxproj +++ b/PCbuild/_decimal.vcxproj -@@ -93,65 +93,27 @@ +@@ -93,64 +93,27 @@ @@ -40,7 +40,6 @@ index e9d60b4db1a..0f49d7923f5 100644 - - - - - - - @@ -54,6 +53,7 @@ index e9d60b4db1a..0f49d7923f5 100644 - - - ++ @@ -84,5 +84,5 @@ index e9d60b4db1a..0f49d7923f5 100644 -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0023-branding.patch b/recipe/patches/0023-branding.patch index 3f910d36c..56dc81d6e 100644 --- a/recipe/patches/0023-branding.patch +++ b/recipe/patches/0023-branding.patch @@ -1,4 +1,4 @@ -From 0eebd158398783bc754a17de1585648bea86f6b1 Mon Sep 17 00:00:00 2001 +From 4513e4447567bbd85ecba7c09e1951b7bb79824a Mon Sep 17 00:00:00 2001 From: Charles Bousseau Date: Wed, 14 Jun 2023 22:52:16 -0400 Subject: [PATCH 22/24] branding @@ -9,10 +9,10 @@ Subject: [PATCH 22/24] branding 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/platform.py b/Lib/platform.py -index 784b6b749b7..b24c0acf5fd 100644 +index 36489d4fdd9..56c79ffe547 100644 --- a/Lib/platform.py +++ b/Lib/platform.py -@@ -1208,7 +1208,7 @@ def _sys_version(sys_version=None): +@@ -1139,7 +1139,7 @@ def _sys_version(sys_version=None): else: # CPython cpython_sys_version_parser = re.compile( @@ -47,5 +47,5 @@ index 8d8bc6ea700..eee07cd5c82 100644 PyOS_snprintf(version, sizeof(version), buildinfo_format, PY_VERSION, Py_GetBuildInfo(), Py_GetCompiler()); -- -2.50.1 (Apple Git-155) +2.51.0 diff --git a/recipe/patches/0024-Unvendor-zlib-ng.patch b/recipe/patches/0024-Unvendor-zlib-ng.patch index 538eca4c9..d82852e69 100644 --- a/recipe/patches/0024-Unvendor-zlib-ng.patch +++ b/recipe/patches/0024-Unvendor-zlib-ng.patch @@ -1,16 +1,16 @@ -From 19e6cbb71ce911498ab4dd6c235195562314bcef Mon Sep 17 00:00:00 2001 +From bd0276b98bafd18a8e6b29ef336136ea8691178d Mon Sep 17 00:00:00 2001 From: Ian Fitchet Date: Mon, 30 Jun 2025 11:20:05 +0100 Subject: [PATCH 23/24] Unvendor zlib-ng --- PCbuild/pcbuild.proj | 2 +- - PCbuild/zlib-ng.vcxproj | 122 +---------------- + PCbuild/zlib-ng.vcxproj | 124 +---------------- PCbuild/zlib-ng.vcxproj.filters | 228 -------------------------------- - 3 files changed, 2 insertions(+), 350 deletions(-) + 3 files changed, 2 insertions(+), 352 deletions(-) diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj -index 7a5327bf016..cde688ef534 100644 +index 9d077bbd3f0..bed07aefa7f 100644 --- a/PCbuild/pcbuild.proj +++ b/PCbuild/pcbuild.proj @@ -48,7 +48,7 @@ @@ -23,7 +23,7 @@ index 7a5327bf016..cde688ef534 100644 tcl$(TclMajorVersion)$(TclMinorVersion)$(tcltkSuffix)$(TclDebugExt).dll diff --git a/recipe/patches/0022-Unvendor-libmpdec.patch b/recipe/patches/0022-Unvendor-libmpdec.patch index 7d971b587..eabdcf4ba 100644 --- a/recipe/patches/0022-Unvendor-libmpdec.patch +++ b/recipe/patches/0022-Unvendor-libmpdec.patch @@ -1,17 +1,17 @@ -From a93336b239983227c6549ec1ede266b769f8a999 Mon Sep 17 00:00:00 2001 -From: Isuru Fernando -Date: Fri, 16 Aug 2024 21:34:43 -0500 -Subject: [PATCH 21/24] Unvendor libmpdec - ---- - PCbuild/_decimal.vcxproj | 51 ++++++---------------------------------- - 1 file changed, 7 insertions(+), 44 deletions(-) - -diff --git a/PCbuild/_decimal.vcxproj b/PCbuild/_decimal.vcxproj -index 921d22e47b3..0f49d7923f5 100644 ---- a/PCbuild/_decimal.vcxproj -+++ b/PCbuild/_decimal.vcxproj -@@ -93,64 +93,27 @@ +From a93336b239983227c6549ec1ede266b769f8a999 Mon Sep 17 00:00:00 2001 +From: Isuru Fernando +Date: Fri, 16 Aug 2024 21:34:43 -0500 +Subject: [PATCH 21/24] Unvendor libmpdec + +--- + PCbuild/_decimal.vcxproj | 51 ++++++---------------------------------- + 1 file changed, 6 insertions(+), 44 deletions(-) + +diff --git a/PCbuild/_decimal.vcxproj b/PCbuild/_decimal.vcxproj +index 921d22e47b3..0f49d7923f5 100644 +--- a/PCbuild/_decimal.vcxproj ++++ b/PCbuild/_decimal.vcxproj +@@ -93,60 +93,22 @@ @@ -23,10 +23,6 @@ index 921d22e47b3..0f49d7923f5 100644 CONFIG_64;MASM;%(PreprocessorDefinitions) - ..\Modules\_decimal;..\Modules\_decimal\windows;$(mpdecimalDir)\libmpdec;%(AdditionalIncludeDirectories) + ..\Modules\_decimal;$(condaDir)\include;%(AdditionalIncludeDirectories) - /d1trimfile:%SRC_DIR% - /d1trimfile:%SRC_DIR% - /d1trimfile:%SRC_DIR% - /d1trimfile:%SRC_DIR% + + $(condaDir)\lib;%(AdditionalLibraryDirectories) @@ -53,7 +49,6 @@ index 921d22e47b3..0f49d7923f5 100644 - - - -+ @@ -85,4 +80,3 @@ index 921d22e47b3..0f49d7923f5 100644 -- 2.51.0 - From 860da0479f9042ccd4b7880abc02df00abf7853e Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Tue, 30 Jun 2026 10:33:51 +0000 Subject: [PATCH 06/30] Add force_use_keys with gil_type for libpython-static --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index bab88012d..de9c55e95 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -315,6 +315,8 @@ outputs: script: build_static.bat # [win] build: number: {{ build_number }} + force_use_keys: + - gil_type activate_in_script: true ignore_run_exports: - python_abi From 075ea4d96c19c1fe413e3120a5404816cfba9f2f Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Tue, 30 Jun 2026 12:00:26 +0000 Subject: [PATCH 07/30] =?UTF-8?q?Regenerated=200022-Unvendor-libmpdec.patc?= =?UTF-8?q?h=20against=20the=20file=20state=20after=20patches=200001?= =?UTF-8?q?=E2=80=930021,=20i.e.=20after=200008=20adds=20the=20d1trimfile?= =?UTF-8?q?=20lines?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- recipe/patches/0022-Unvendor-libmpdec.patch | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/recipe/patches/0022-Unvendor-libmpdec.patch b/recipe/patches/0022-Unvendor-libmpdec.patch index eabdcf4ba..f0344784d 100644 --- a/recipe/patches/0022-Unvendor-libmpdec.patch +++ b/recipe/patches/0022-Unvendor-libmpdec.patch @@ -5,13 +5,13 @@ Subject: [PATCH 21/24] Unvendor libmpdec --- PCbuild/_decimal.vcxproj | 51 ++++++---------------------------------- - 1 file changed, 6 insertions(+), 44 deletions(-) + 1 file changed, 6 insertions(+), 43 deletions(-) diff --git a/PCbuild/_decimal.vcxproj b/PCbuild/_decimal.vcxproj index 921d22e47b3..0f49d7923f5 100644 --- a/PCbuild/_decimal.vcxproj +++ b/PCbuild/_decimal.vcxproj -@@ -93,60 +93,22 @@ +@@ -93,65 +93,28 @@ @@ -23,6 +23,10 @@ index 921d22e47b3..0f49d7923f5 100644 CONFIG_64;MASM;%(PreprocessorDefinitions) - ..\Modules\_decimal;..\Modules\_decimal\windows;$(mpdecimalDir)\libmpdec;%(AdditionalIncludeDirectories) + ..\Modules\_decimal;$(condaDir)\include;%(AdditionalIncludeDirectories) + /d1trimfile:%SRC_DIR% + /d1trimfile:%SRC_DIR% + /d1trimfile:%SRC_DIR% + /d1trimfile:%SRC_DIR% + + $(condaDir)\lib;%(AdditionalLibraryDirectories) @@ -66,8 +70,8 @@ index 921d22e47b3..0f49d7923f5 100644 - - - -- -- + + - - true - true @@ -75,8 +79,9 @@ index 921d22e47b3..0f49d7923f5 100644 - ml64 /nologo /c /Zi /Fo "$(IntDir)vcdiv64.obj" "%(FullPath)" - $(IntDir)vcdiv64.obj;%(Outputs) - - +- + -- 2.51.0 From 1ee9ffae24ade1201d60cda92b5a30ae116b311f Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Tue, 30 Jun 2026 12:33:09 +0000 Subject: [PATCH 08/30] =?UTF-8?q?Revert=20changes=20in=20a=20local=20cbc.y?= =?UTF-8?q?aml;=20Regenerated=20the=20patch=200022=20against=20post-0001?= =?UTF-8?q?=E2=80=930021=20state?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- recipe/conda_build_config.yaml | 6 ++++++ recipe/patches/0022-Unvendor-libmpdec.patch | 15 +++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 0f17d307d..b8c77e32c 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,3 +1,9 @@ +python: + - 3.15 +python_impl: + - cpython +numpy: + - 2.5 gil_type: - normal # Will be enabled as part of https://anaconda.atlassian.net/browse/PKG-5855 diff --git a/recipe/patches/0022-Unvendor-libmpdec.patch b/recipe/patches/0022-Unvendor-libmpdec.patch index f0344784d..49ee98523 100644 --- a/recipe/patches/0022-Unvendor-libmpdec.patch +++ b/recipe/patches/0022-Unvendor-libmpdec.patch @@ -5,13 +5,13 @@ Subject: [PATCH 21/24] Unvendor libmpdec --- PCbuild/_decimal.vcxproj | 51 ++++++---------------------------------- - 1 file changed, 6 insertions(+), 43 deletions(-) + 1 file changed, 6 insertions(+), 46 deletions(-) diff --git a/PCbuild/_decimal.vcxproj b/PCbuild/_decimal.vcxproj index 921d22e47b3..0f49d7923f5 100644 --- a/PCbuild/_decimal.vcxproj +++ b/PCbuild/_decimal.vcxproj -@@ -93,65 +93,28 @@ +@@ -93,64 +93,24 @@ @@ -53,8 +53,8 @@ index 921d22e47b3..0f49d7923f5 100644 - - - - - +- +- - - @@ -70,8 +70,8 @@ index 921d22e47b3..0f49d7923f5 100644 - - - - - +- +- - - true - true @@ -79,9 +79,8 @@ index 921d22e47b3..0f49d7923f5 100644 - ml64 /nologo /c /Zi /Fo "$(IntDir)vcdiv64.obj" "%(FullPath)" - $(IntDir)vcdiv64.obj;%(Outputs) - -- + - -- 2.51.0 From ee6df3cdbd8b14a5664b18861adaa57165eee08c Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Tue, 30 Jun 2026 13:54:53 +0000 Subject: [PATCH 09/30] Regenarate the 0014 patch. --- recipe/patches/0014-Unvendor-tcltk.patch | 50 ++++++++++-------------- 1 file changed, 21 insertions(+), 29 deletions(-) diff --git a/recipe/patches/0014-Unvendor-tcltk.patch b/recipe/patches/0014-Unvendor-tcltk.patch index c8f31f822..20a029491 100644 --- a/recipe/patches/0014-Unvendor-tcltk.patch +++ b/recipe/patches/0014-Unvendor-tcltk.patch @@ -1,18 +1,18 @@ -From 0c88a8e5d9673742d74fb5b4be8ad45c33f1f43f Mon Sep 17 00:00:00 2001 -From: Isuru Fernando -Date: Fri, 20 Aug 2021 10:23:51 -0700 -Subject: [PATCH 14/24] Unvendor tcltk - ---- - PCbuild/_tkinter.vcxproj | 6 ------ - PCbuild/tcltk.props | 8 +++----- - 2 files changed, 3 insertions(+), 11 deletions(-) - -diff --git a/PCbuild/_tkinter.vcxproj b/PCbuild/_tkinter.vcxproj -index de9358312ac..3fe2c29c823 100644 ---- a/PCbuild/_tkinter.vcxproj -+++ b/PCbuild/_tkinter.vcxproj -@@ -128,12 +128,6 @@ +From 0c88a8e5d9673742d74fb5b4be8ad45c33f1f43f Mon Sep 17 00:00:00 2001 +From: Isuru Fernando +Date: Fri, 20 Aug 2021 10:23:51 -0700 +Subject: [PATCH 14/24] Unvendor tcltk + +--- + PCbuild/_tkinter.vcxproj | 6 ------ + PCbuild/tcltk.props | 7 +++---- + 2 files changed, 3 insertions(+), 10 deletions(-) + +diff --git a/PCbuild/_tkinter.vcxproj b/PCbuild/_tkinter.vcxproj +index de93583..3fe2c29 100644 +--- a/PCbuild/_tkinter.vcxproj ++++ b/PCbuild/_tkinter.vcxproj +@@ -128,12 +128,6 @@ @@ -25,15 +25,14 @@ index de9358312ac..3fe2c29c823 100644 -diff --git a/PCbuild/tcltk.props b/PCbuild/tcltk.props -index 28e8c0db4d1..537de0e5e38 100644 ---- a/PCbuild/tcltk.props -+++ b/PCbuild/tcltk.props -@@ -12,15 +12,13 @@ - $([System.Version]::Parse($(TkVersion)).Minor) +diff --git a/PCbuild/tcltk.props b/PCbuild/tcltk.props +index 28e8c0d..cf2b2dc 100644 +--- a/PCbuild/tcltk.props ++++ b/PCbuild/tcltk.props +@@ -13,10 +13,9 @@ $([System.Version]::Parse($(TkVersion)).Build) $([System.Version]::Parse($(TkVersion)).Revision) -- + - $(ExternalsDir)tcl-core-$(TclVersion)\ - $(ExternalsDir)tcl-$(TclVersion)\ - $(ExternalsDir)tk-$(TkVersion)\ @@ -44,10 +43,3 @@ index 28e8c0db4d1..537de0e5e38 100644 t tcl9 TCLSH_NATIVE="$(tcltkDir)\..\win32\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)$(tcltkSuffix).exe" - TCL_WITH_EXTERNAL_TOMMATH; - - - tcl$(TclMajorVersion)$(TclMinorVersion)$(tcltkSuffix)$(TclDebugExt).dll --- -2.51.0 - From c32ba9c8956c02895e630bdccbca7d3dabc993cc Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Tue, 30 Jun 2026 14:15:00 +0000 Subject: [PATCH 10/30] Pin tcl/tk to conda tk 8.6 on win-64 --- recipe/build_base.bat | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/recipe/build_base.bat b/recipe/build_base.bat index 8dd555e52..e27d50fb1 100644 --- a/recipe/build_base.bat +++ b/recipe/build_base.bat @@ -25,6 +25,15 @@ for /F "tokens=1,2 delims=." %%i in ("%PKG_VERSION%") do ( if NOT "%PY_VER%"=="%%i.%%j" exit 1 ) +:: Pin Tcl/Tk to conda tk 8.6 (upstream 3.15 defaults to Tcl 9.0.3.0) +for /f "usebackq delims=" %%i in (`conda list -p %PREFIX% tk --no-show-channel-urls --json ^| findstr "version"`) do set TK_VERSION_LINE=%%i +for /f "tokens=2 delims==/ " %%i IN ('echo %TK_VERSION_LINE%') do (set TK_VERSION=%%~i) +echo TK_VERSION detected as %TK_VERSION%.0 +set TCLTK_MSBUILD_PROPS="/p:TclVersion=%TK_VERSION%.0" "/p:TkVersion=%TK_VERSION%.0" + +cd PCbuild +call build.bat %PGO% %CONFIG% %FREETHREADING% -m -e -v -p %PLATFORM% %TCLTK_MSBUILD_PROPS% + for /f "usebackq delims=" %%i in (`conda list -p %PREFIX% sqlite --no-show-channel-urls --json ^| findstr "version"`) do set SQLITE3_VERSION_LINE=%%i for /f "tokens=2 delims==/ " %%i IN ('echo %SQLITE3_VERSION_LINE%') do (set SQLITE3_VERSION=%%~i) echo SQLITE3_VERSION detected as %SQLITE3_VERSION% From d10d902c8fdb2083bc2ddc21675d7bd9ff152205 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Wed, 1 Jul 2026 07:33:24 +0000 Subject: [PATCH 11/30] win-64: pin Tcl/Tk 8.6 via tcltk.props default in 0014 patch Upstream CPython 3.15 defaults TclVersion to 9.0.3.0 in PCbuild/tcltk.props, so _tkinter linked tcl90.lib/tcl9tk90.lib/tommath.lib and failed with LNK1181 (pkgs/main only ships tk 8.6 -> tcl86t.lib/tk86t.lib). The previous build_base.bat approach (c32ba9c) passed /p:TclVersion via MSBuild but only to a premature build.bat call; the real build call (run twice for the importlib_zipimport.h rebuild) had no props and reverted to Tcl 9. Set the default in the unvendor patch instead so every build.bat invocation picks up 8.6.15.0 regardless of args, mirroring build_base.sh (-ltcl8.6 -ltk8.6). Revert the now-redundant build_base.bat tk-detection + premature build call. Co-authored-by: Cursor --- recipe/build_base.bat | 9 ---- recipe/patches/0014-Unvendor-tcltk.patch | 52 +++++++++++++++--------- 2 files changed, 32 insertions(+), 29 deletions(-) diff --git a/recipe/build_base.bat b/recipe/build_base.bat index e27d50fb1..8dd555e52 100644 --- a/recipe/build_base.bat +++ b/recipe/build_base.bat @@ -25,15 +25,6 @@ for /F "tokens=1,2 delims=." %%i in ("%PKG_VERSION%") do ( if NOT "%PY_VER%"=="%%i.%%j" exit 1 ) -:: Pin Tcl/Tk to conda tk 8.6 (upstream 3.15 defaults to Tcl 9.0.3.0) -for /f "usebackq delims=" %%i in (`conda list -p %PREFIX% tk --no-show-channel-urls --json ^| findstr "version"`) do set TK_VERSION_LINE=%%i -for /f "tokens=2 delims==/ " %%i IN ('echo %TK_VERSION_LINE%') do (set TK_VERSION=%%~i) -echo TK_VERSION detected as %TK_VERSION%.0 -set TCLTK_MSBUILD_PROPS="/p:TclVersion=%TK_VERSION%.0" "/p:TkVersion=%TK_VERSION%.0" - -cd PCbuild -call build.bat %PGO% %CONFIG% %FREETHREADING% -m -e -v -p %PLATFORM% %TCLTK_MSBUILD_PROPS% - for /f "usebackq delims=" %%i in (`conda list -p %PREFIX% sqlite --no-show-channel-urls --json ^| findstr "version"`) do set SQLITE3_VERSION_LINE=%%i for /f "tokens=2 delims==/ " %%i IN ('echo %SQLITE3_VERSION_LINE%') do (set SQLITE3_VERSION=%%~i) echo SQLITE3_VERSION detected as %SQLITE3_VERSION% diff --git a/recipe/patches/0014-Unvendor-tcltk.patch b/recipe/patches/0014-Unvendor-tcltk.patch index 20a029491..592f66031 100644 --- a/recipe/patches/0014-Unvendor-tcltk.patch +++ b/recipe/patches/0014-Unvendor-tcltk.patch @@ -1,18 +1,18 @@ -From 0c88a8e5d9673742d74fb5b4be8ad45c33f1f43f Mon Sep 17 00:00:00 2001 -From: Isuru Fernando -Date: Fri, 20 Aug 2021 10:23:51 -0700 -Subject: [PATCH 14/24] Unvendor tcltk - ---- - PCbuild/_tkinter.vcxproj | 6 ------ - PCbuild/tcltk.props | 7 +++---- - 2 files changed, 3 insertions(+), 10 deletions(-) - -diff --git a/PCbuild/_tkinter.vcxproj b/PCbuild/_tkinter.vcxproj -index de93583..3fe2c29 100644 ---- a/PCbuild/_tkinter.vcxproj -+++ b/PCbuild/_tkinter.vcxproj -@@ -128,12 +128,6 @@ +From 0c88a8e5d9673742d74fb5b4be8ad45c33f1f43f Mon Sep 17 00:00:00 2001 +From: Isuru Fernando +Date: Fri, 20 Aug 2021 10:23:51 -0700 +Subject: [PATCH 14/24] Unvendor tcltk + +--- + PCbuild/_tkinter.vcxproj | 6 ------ + PCbuild/tcltk.props | 9 ++++----- + 2 files changed, 4 insertions(+), 11 deletions(-) + +diff --git a/PCbuild/_tkinter.vcxproj b/PCbuild/_tkinter.vcxproj +index de93583..3fe2c29 100644 +--- a/PCbuild/_tkinter.vcxproj ++++ b/PCbuild/_tkinter.vcxproj +@@ -128,12 +128,6 @@ @@ -25,11 +25,20 @@ index de93583..3fe2c29 100644 -diff --git a/PCbuild/tcltk.props b/PCbuild/tcltk.props -index 28e8c0d..cf2b2dc 100644 ---- a/PCbuild/tcltk.props -+++ b/PCbuild/tcltk.props -@@ -13,10 +13,9 @@ +diff --git a/PCbuild/tcltk.props b/PCbuild/tcltk.props +index 28e8c0d..e8bdd80 100644 +--- a/PCbuild/tcltk.props ++++ b/PCbuild/tcltk.props +@@ -2,7 +2,7 @@ + + + +- 9.0.3.0 ++ 8.6.15.0 + $(TclVersion) + $([System.Version]::Parse($(TclVersion)).Major) + $([System.Version]::Parse($(TclVersion)).Minor) +@@ -13,10 +13,9 @@ $([System.Version]::Parse($(TkVersion)).Build) $([System.Version]::Parse($(TkVersion)).Revision) @@ -43,3 +52,6 @@ index 28e8c0d..cf2b2dc 100644 t tcl9 TCLSH_NATIVE="$(tcltkDir)\..\win32\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)$(tcltkSuffix).exe" +-- +2.34.1 + From d4398f3f74eaba1655b4389468a154ae4f995572 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Wed, 1 Jul 2026 07:38:00 +0000 Subject: [PATCH 12/30] win-64: pin Tcl/Tk 8.6 in build_base.bat, keep 0014 patch pure-unvendor Move the Tcl/Tk 8.6 pin out of patch 0014 and into build_base.bat, mirroring the Unix build_base.sh approach (--with-tcltk-libs -ltcl8.6 -ltk8.6). Patches should stay faithful to upstream unvendor intent and not carry version policy. 0014 is restored to pure unvendor (ExternalsDir -> $(condaDir) only). The single real build.bat call now receives /p:TclVersion=8.6.15.0 /p:TkVersion=8.6.15.0, so MSBuild links tcl86t.lib/tk86t.lib instead of the upstream 3.15 Tcl 9 default (tcl90.lib -> LNK1181). The premature build.bat call from c32ba9c stays removed, so there is exactly one build.bat invocation and it carries the props. Co-authored-by: Cursor --- recipe/build_base.bat | 6 ++- recipe/patches/0014-Unvendor-tcltk.patch | 52 +++++++++--------------- 2 files changed, 25 insertions(+), 33 deletions(-) diff --git a/recipe/build_base.bat b/recipe/build_base.bat index 8dd555e52..df0db890e 100644 --- a/recipe/build_base.bat +++ b/recipe/build_base.bat @@ -57,11 +57,15 @@ if "%PY_GIL_DISABLED%" == "yes" ( :: AP doesn't support PGO atm? set PGO= +:: Pin Tcl/Tk 8.6 - mirrors build_base.sh (-ltcl8.6 -ltk8.6); upstream 3.15 +:: tcltk.props defaults TclVersion to 9.0.3.0, but pkgs/main only ships tk 8.6. +set TCLTK_MSBUILD_PROPS="/p:TclVersion=8.6.15.0" "/p:TkVersion=8.6.15.0" + cd PCbuild :: Twice because: :: error : importlib_zipimport.h updated. You will need to rebuild pythoncore to see the changes. -call build.bat %PGO% %CONFIG% %FREETHREADING% -m -e -v -p %PLATFORM% +call build.bat %PGO% %CONFIG% %FREETHREADING% -m -e -v -p %PLATFORM% %TCLTK_MSBUILD_PROPS% if errorlevel 1 exit 1 cd .. diff --git a/recipe/patches/0014-Unvendor-tcltk.patch b/recipe/patches/0014-Unvendor-tcltk.patch index 592f66031..20a029491 100644 --- a/recipe/patches/0014-Unvendor-tcltk.patch +++ b/recipe/patches/0014-Unvendor-tcltk.patch @@ -1,18 +1,18 @@ -From 0c88a8e5d9673742d74fb5b4be8ad45c33f1f43f Mon Sep 17 00:00:00 2001 -From: Isuru Fernando -Date: Fri, 20 Aug 2021 10:23:51 -0700 -Subject: [PATCH 14/24] Unvendor tcltk - ---- - PCbuild/_tkinter.vcxproj | 6 ------ - PCbuild/tcltk.props | 9 ++++----- - 2 files changed, 4 insertions(+), 11 deletions(-) - -diff --git a/PCbuild/_tkinter.vcxproj b/PCbuild/_tkinter.vcxproj -index de93583..3fe2c29 100644 ---- a/PCbuild/_tkinter.vcxproj -+++ b/PCbuild/_tkinter.vcxproj -@@ -128,12 +128,6 @@ +From 0c88a8e5d9673742d74fb5b4be8ad45c33f1f43f Mon Sep 17 00:00:00 2001 +From: Isuru Fernando +Date: Fri, 20 Aug 2021 10:23:51 -0700 +Subject: [PATCH 14/24] Unvendor tcltk + +--- + PCbuild/_tkinter.vcxproj | 6 ------ + PCbuild/tcltk.props | 7 +++---- + 2 files changed, 3 insertions(+), 10 deletions(-) + +diff --git a/PCbuild/_tkinter.vcxproj b/PCbuild/_tkinter.vcxproj +index de93583..3fe2c29 100644 +--- a/PCbuild/_tkinter.vcxproj ++++ b/PCbuild/_tkinter.vcxproj +@@ -128,12 +128,6 @@ @@ -25,20 +25,11 @@ index de93583..3fe2c29 100644 -diff --git a/PCbuild/tcltk.props b/PCbuild/tcltk.props -index 28e8c0d..e8bdd80 100644 ---- a/PCbuild/tcltk.props -+++ b/PCbuild/tcltk.props -@@ -2,7 +2,7 @@ - - - -- 9.0.3.0 -+ 8.6.15.0 - $(TclVersion) - $([System.Version]::Parse($(TclVersion)).Major) - $([System.Version]::Parse($(TclVersion)).Minor) -@@ -13,10 +13,9 @@ +diff --git a/PCbuild/tcltk.props b/PCbuild/tcltk.props +index 28e8c0d..cf2b2dc 100644 +--- a/PCbuild/tcltk.props ++++ b/PCbuild/tcltk.props +@@ -13,10 +13,9 @@ $([System.Version]::Parse($(TkVersion)).Build) $([System.Version]::Parse($(TkVersion)).Revision) @@ -52,6 +43,3 @@ index 28e8c0d..e8bdd80 100644 t tcl9 TCLSH_NATIVE="$(tcltkDir)\..\win32\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)$(tcltkSuffix).exe" --- -2.34.1 - From a5d1e22ffc7f02ce44567b3643800ef4a4290a4a Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Wed, 1 Jul 2026 07:46:07 +0000 Subject: [PATCH 13/30] Drive Tcl/Tk version from the tk conda_build_config variant Use the `tk` variant (conda_build_config.yaml, single source of truth) instead of hardcoding 8.6 in the build scripts. conda-build exports every variant key into the build env, so `%tk%` (Windows) and `${TCLTK_VER}` (=${tk}, Unix) both resolve to 8.6 at build time. - build_base.bat: /p:TclVersion=%tk% /p:TkVersion=%tk% (was 8.6.15.0) - build_base.sh: -ltcl${TCLTK_VER} -ltk${TCLTK_VER} (was -ltcl8.6 -ltk8.6); finally uses the TCLTK_VER=${tk} that was previously set but unused. Bump the single tk pin in CBC to update both platforms. Co-authored-by: Cursor --- recipe/build_base.bat | 8 +++++--- recipe/build_base.sh | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/recipe/build_base.bat b/recipe/build_base.bat index df0db890e..f67bd7cdb 100644 --- a/recipe/build_base.bat +++ b/recipe/build_base.bat @@ -57,9 +57,11 @@ if "%PY_GIL_DISABLED%" == "yes" ( :: AP doesn't support PGO atm? set PGO= -:: Pin Tcl/Tk 8.6 - mirrors build_base.sh (-ltcl8.6 -ltk8.6); upstream 3.15 -:: tcltk.props defaults TclVersion to 9.0.3.0, but pkgs/main only ships tk 8.6. -set TCLTK_MSBUILD_PROPS="/p:TclVersion=8.6.15.0" "/p:TkVersion=8.6.15.0" +:: Pin Tcl/Tk from the `tk` variant in conda_build_config.yaml (single source of +:: truth, shared with build_base.sh). Upstream 3.15 tcltk.props defaults +:: TclVersion to 9.0.3.0, but pkgs/main only ships tk 8.6; MSBuild derives the +:: lib names (tcl86t.lib/tk86t.lib) from the major.minor of these props. +set TCLTK_MSBUILD_PROPS="/p:TclVersion=%tk%" "/p:TkVersion=%tk%" cd PCbuild diff --git a/recipe/build_base.sh b/recipe/build_base.sh index 2cfa044bf..615fd05c3 100644 --- a/recipe/build_base.sh +++ b/recipe/build_base.sh @@ -254,7 +254,7 @@ _common_configure_args+=(--with-computed-gotos) _common_configure_args+=(--with-system-expat) _common_configure_args+=(--enable-loadable-sqlite-extensions) _common_configure_args+=(--with-tcltk-includes="-I${PREFIX}/include") -_common_configure_args+=("--with-tcltk-libs=-L${PREFIX}/lib -ltcl8.6 -ltk8.6") +_common_configure_args+=("--with-tcltk-libs=-L${PREFIX}/lib -ltcl${TCLTK_VER} -ltk${TCLTK_VER}") _common_configure_args+=(--with-platlibdir=lib) _common_configure_args+=(--with-system-libmpdec=yes) From f1877e0959c1747384dfef4f41e7b1a08bf8f79e Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Wed, 1 Jul 2026 08:24:56 +0000 Subject: [PATCH 14/30] Add upload_channels to abs.yaml --- abs.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/abs.yaml b/abs.yaml index fc245fb9a..ea6582d92 100644 --- a/abs.yaml +++ b/abs.yaml @@ -5,5 +5,5 @@ build_parameters: - "--error-overlinking" - "--error-overdepending" -build_env_vars: - ANACONDA_ROCKET_ENABLE_PY315 : yes +upload_channels: + - ad-testing From 00abf1ae4aea3add6016230004979ec90d76aace Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Wed, 1 Jul 2026 08:51:33 +0000 Subject: [PATCH 15/30] win-64: use amd64t BUILD_PATH for freethreading staging Upstream PCbuild writes free-threaded artifacts to PCbuild\amd64t\ (DisableGil=true in python.props), but build_base.bat always staged from amd64\. The GIL-enabled win-64 build passed; the freethreading build compiled successfully (including _tkinter linking tcl86t.lib/tk86t.lib) but failed at xcopy *.pyd with "File not found" because BUILD_PATH was wrong. Set BUILD_PATH=amd64t (or win32t) when PY_GIL_DISABLED=yes so exes, pyds, and libs are copied from the correct output directory. Co-authored-by: Cursor --- recipe/build_base.bat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipe/build_base.bat b/recipe/build_base.bat index f67bd7cdb..5309e70db 100644 --- a/recipe/build_base.bat +++ b/recipe/build_base.bat @@ -48,6 +48,11 @@ if "%PY_GIL_DISABLED%" == "yes" ( set "FREETHREADING=--disable-gil" set "THREAD=t" set "EXE_T=%VER%t" + if "%ARCH%"=="64" ( + set BUILD_PATH=amd64t + ) else ( + set BUILD_PATH=win32t + ) ) else ( set "FREETHREADING=--experimental-jit-off" set "THREAD=" From 342855bbdfe2dee7c3c3b4798118f5874d171554 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Wed, 1 Jul 2026 09:00:12 +0000 Subject: [PATCH 16/30] Free-threaded MSBuild output goes to PCbuild\amd64t --- recipe/build_base.bat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipe/build_base.bat b/recipe/build_base.bat index 5309e70db..a1eb17557 100644 --- a/recipe/build_base.bat +++ b/recipe/build_base.bat @@ -48,6 +48,11 @@ if "%PY_GIL_DISABLED%" == "yes" ( set "FREETHREADING=--disable-gil" set "THREAD=t" set "EXE_T=%VER%t" + :: Free-threaded MSBuild output goes to PCbuild\amd64t\ (or win32t\), not amd64\. + :: Upstream python.props sets BuildPath=BuildPath64t when DisableGil=true; all + :: exes, .pyd, and .lib artifacts land there. BUILD_PATH below is used to + :: stage those files into %PREFIX% — leaving it at amd64 makes xcopy *.pyd fail + :: with "File not found" even though the compile itself succeeded. if "%ARCH%"=="64" ( set BUILD_PATH=amd64t ) else ( From 44ecbd1a97828db9a37e47e83037a1158f69a7f1 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Wed, 1 Jul 2026 09:55:21 +0000 Subject: [PATCH 17/30] =?UTF-8?q?For=20freethreading=20only,=20copy=20PCbu?= =?UTF-8?q?ild\amd64t\python3.dll=20=E2=86=92=20%PREFIX%\python3.dll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- recipe/build_base.bat | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/recipe/build_base.bat b/recipe/build_base.bat index a1eb17557..cc7edd70c 100644 --- a/recipe/build_base.bat +++ b/recipe/build_base.bat @@ -90,6 +90,21 @@ for %%x in (python%VERNODOTS%%THREAD%%_D%.dll python3%THREAD%%_D%.dll python%EXE ) ) +:: Free-threaded builds emit both python3t.dll (interpreter) and python3.dll (stable ABI +:: shim for limited-API extensions). The loop above stages python3t.dll via +:: python3%THREAD%.dll; xxlimited*.pyd and other Py_LIMITED_API modules still import +:: python3.dll — conda-build overlinking fails if it is not copied into %PREFIX%: +:: ERROR (python,DLLs/xxlimited_3_13.cp315t-win_amd64.pyd): $RPATH/python3.dll not found in packages, sysroot(s) nor the missing_dso_whitelist. +:: ERROR (python,DLLs/xxlimited.cp315t-win_amd64.pyd): $RPATH/python3.dll not found in packages, sysroot(s) nor the missing_dso_whitelist. +:: ERROR (python,DLLs/xxlimited_35.cp315t-win_amd64.pyd): $RPATH/python3.dll not found in packages, sysroot(s) nor the missing_dso_whitelist. +if "%PY_GIL_DISABLED%" == "yes" ( + if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\python3%_D%.dll ( + copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\python3%_D%.dll %PREFIX% + ) else ( + echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\python3%_D%.dll does not exist" + ) +) + for %%x in (python%_D%.pdb python%VERNODOTS%%_D%.pdb pythonw%_D%.pdb) do ( if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x ( copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x %PREFIX% From c9f84de618799dbf8a1abe737a581f33acc1f2f6 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Thu, 2 Jul 2026 10:21:21 +0000 Subject: [PATCH 18/30] Fix and improve py315b3 tests --- recipe/run_test_py315.py | 230 +++++++++++++++++++++++++++------------ 1 file changed, 163 insertions(+), 67 deletions(-) diff --git a/recipe/run_test_py315.py b/recipe/run_test_py315.py index 519d275a8..3e5324066 100644 --- a/recipe/run_test_py315.py +++ b/recipe/run_test_py315.py @@ -1,33 +1,48 @@ +# Python 3.15 conda-build feature test — verified against 3.15.0b3 (2026 series). +# # Design contract: # - HARD checks (interpreter identity, core stdlib, ABI/build sanity) -> failure # fails the conda-build test phase (non-zero exit). -# - SOFT checks (new PEP features) -> reported as PASS/SKIP, never fail the build, -# UNLESS the env var RUN_TEST_STRICT=1 is set (promote SOFT failures to HARD). -# Rationale: 3.15 is in beta; PEP APIs may shift until RC1 (2026-08-04). +# - SOFT checks (new PEP feature probes) -> reported as PASS/SKIP, never fail +# the build UNLESS one of: +# * RUN_TEST_STRICT=1 in the environment (manual promote SOFT->HARD), or +# * we are running on rc1 or later (auto-promote — PEP feature spellings +# are frozen at the RC boundary per PEP 790, so a SKIP after that date +# means we're building against a stale probe). # -# Tighten the SOFT probes into HARD asserts once building against v3.15.0rc1+. +# Sources (see docs/tools/python-3.15-probe-audit.md for the full audit): +# - Python 3.15 What's New: https://docs.python.org/3.15/whatsnew/3.15.html +# - PEP 790 (release schedule): https://peps.python.org/pep-0790/ — RC1 2026-08-04 +# - PEP-specific references embedded in each probe below. from __future__ import annotations +import builtins import importlib.util import os import platform +import site import sys import sysconfig from dataclasses import dataclass -STRICT = os.environ.get("RUN_TEST_STRICT", "0") == "1" - -# The PEP feature probes only make sense on 3.15. On any other Python version -# (e.g. a shared recipe built across a py matrix) they are skipped entirely. +PASS, SKIP, FAIL = "PASS", "SKIP", "FAIL" TARGET_VERSION = (3, 15) IS_TARGET = sys.version_info[:2] == TARGET_VERSION + +# Manual override for local development / CI hardening. +STRICT_ENV = os.environ.get("RUN_TEST_STRICT", "0") == "1" + +# Auto-promote at rc1 — after 2026-08-04 the PEP APIs are frozen and any SKIP +# from a feature probe means the probe is stale, not that the feature is absent. +# Rationale: probes are advisory during beta only. +AUTO_STRICT = IS_TARGET and sys.version_info.releaselevel != "beta" +STRICT = STRICT_ENV or AUTO_STRICT + # For the dedicated python-3.15 feedstock, set RUN_TEST_REQUIRE_315=1 so a -# non-3.15 interpreter is a HARD failure instead of a skip (catches a bad matrix). +# non-3.15 interpreter is a HARD failure instead of a skip (catches bad matrices). REQUIRE_TARGET = os.environ.get("RUN_TEST_REQUIRE_315", "0") == "1" -PASS, SKIP, FAIL = "PASS", "SKIP", "FAIL" - @dataclass class Result: @@ -45,6 +60,8 @@ def record(name: str, status: str, detail: str = "", *, hard: bool = False) -> N def _spec_exists(modname: str) -> bool: + # `find_spec` is safer than `import` — it does not execute module top-level + # code, which matters for probes on packages that may hold heavy imports. try: return importlib.util.find_spec(modname) is not None except (ImportError, ValueError): @@ -61,7 +78,7 @@ def _compiles(src: str) -> bool: # --------------------------------------------------------------------------- # -# HARD checks: must hold for any correct 3.15 build +# HARD checks — must hold for any correct 3.15 build # --------------------------------------------------------------------------- # def check_interpreter_identity() -> None: @@ -74,7 +91,6 @@ def check_interpreter_identity() -> None: f"expected 3.15, got {sys.version_info[0]}.{sys.version_info[1]}", hard=True) else: - # Not the target version: sanity still runs, feature probes are skipped. record("interpreter 3.15", SKIP, f"not target ({ver}) -> probes skipped") @@ -83,7 +99,7 @@ def check_core_stdlib() -> None: # that lacks system libs (ssl/lzma/sqlite/...) imports the pure parts fine # but breaks at runtime. Importing them here turns that into a build failure. required = ["ssl", "ctypes", "sqlite3", "lzma", "bz2", "zlib", - "hashlib", "decimal", "readline", "curses"] + "hashlib", "decimal", "readline", "curses"] missing = [] for mod in required: # readline/curses are absent on Windows by design. @@ -112,11 +128,13 @@ def check_build_sanity() -> None: # --------------------------------------------------------------------------- # -# SOFT probes: 3.15 new features (API spellings may change before RC1) +# SOFT probes — 3.15 new features (verified against b3; frozen at rc1) # --------------------------------------------------------------------------- # def probe_pep686_utf8_default() -> None: - # PEP 686: UTF-8 mode default. sys.flags.utf8_mode should be 1. + # PEP 686: UTF-8 is the unconditional default in 3.15 (independent of locale). + # Behavioral change is most visible on Windows; on POSIX with UTF-8 locales + # it was already effectively UTF-8. sys.flags.utf8_mode == 1 by default now. mode = getattr(sys.flags, "utf8_mode", None) if mode == 1: record("PEP 686 UTF-8 default", PASS, "sys.flags.utf8_mode=1") @@ -125,98 +143,165 @@ def probe_pep686_utf8_default() -> None: def probe_pep810_lazy_imports() -> None: - # PEP 810: explicit `lazy import` statement syntax. - record("PEP 810 lazy imports", - PASS if _compiles("lazy import os\n") else SKIP, - "compile('lazy import os')") + # PEP 810: `lazy` soft keyword — module-scope only. Syntax alone enables it; + # no __future__ import is required. Belt-and-suspenders: compile probe AND + # a runtime attribute (sys.set_lazy_imports) that also lands in 3.15. + compile_ok = _compiles("lazy import os\n") + runtime_ok = hasattr(sys, "set_lazy_imports") + if compile_ok and runtime_ok: + record("PEP 810 lazy imports", PASS, "syntax + sys.set_lazy_imports") + elif compile_ok or runtime_ok: + record("PEP 810 lazy imports", PASS, + f"partial: compile={compile_ok} runtime={runtime_ok}") + else: + record("PEP 810 lazy imports", SKIP, "neither syntax nor runtime API") def probe_pep798_unpack_comprehension() -> None: - # PEP 798: unpacking in comprehensions, e.g. [*xs for xs in groups]. + # PEP 798: unpacking in comprehensions. NOTE: unbracketed genexp-call form + # `f(*x for x in xs)` still raises SyntaxError — do not probe that here. src = "result = [*xs for xs in [[1, 2], [3]]]" - if _compiles(src): - ns: dict = {} - try: - exec(src, ns) - ok = ns.get("result") == [1, 2, 3] - record("PEP 798 unpack-in-comprehension", - PASS if ok else FAIL, f"result={ns.get('result')}") - except Exception as exc: # noqa: BLE001 - feature probe - record("PEP 798 unpack-in-comprehension", FAIL, repr(exc)) - else: + if not _compiles(src): record("PEP 798 unpack-in-comprehension", SKIP, "syntax not accepted") + return + ns: dict = {} + try: + exec(src, ns) + ok = ns.get("result") == [1, 2, 3] + record("PEP 798 unpack-in-comprehension", + PASS if ok else FAIL, f"result={ns.get('result')}") + except Exception as exc: # noqa: BLE001 - feature probe + record("PEP 798 unpack-in-comprehension", FAIL, repr(exc)) def probe_pep814_frozendict() -> None: - # PEP 814: frozendict built-in. - fd = getattr(__builtins__, "frozendict", None) if not isinstance( - __builtins__, dict) else __builtins__.get("frozendict") + # PEP 814: `frozendict` is a true BUILTIN (not types.frozendict). + # Also NOT a subclass of dict — inherits directly from object; use + # isinstance(x, (dict, frozendict)) or collections.abc.Mapping in consumers. + if not hasattr(builtins, "frozendict"): + record("PEP 814 frozendict", SKIP, "builtin absent") + return + fd = builtins.frozendict({"a": 1}) + # Sanity: constructs, hashable, not a dict subclass. + ok = hash(fd) is not None and not isinstance(fd, dict) record("PEP 814 frozendict", - PASS if fd is not None else SKIP, - "builtin present" if fd is not None else "builtin absent") + PASS if ok else FAIL, + f"hashable={ok}, not dict-subclass={not isinstance(fd, dict)}") def probe_pep661_sentinel() -> None: - # PEP 661: sentinel built-in type. Spelling unconfirmed at b3 — probe builtin - # name first, then a possible 'sentinels' module fallback. - builtin = (__builtins__.get("sentinel") if isinstance(__builtins__, dict) - else getattr(__builtins__, "sentinel", None)) - if builtin is not None: - record("PEP 661 sentinel", PASS, "builtin present") - elif _spec_exists("sentinels"): - record("PEP 661 sentinel", PASS, "module 'sentinels' present") - else: - record("PEP 661 sentinel", SKIP, "not found (check final API)") + # PEP 661: `sentinel` is a BUILTIN lowercase callable — sentinel("NAME"). + # NOT a module import. The typing_extensions backport is capital-S Sentinel, + # but the 3.15 builtin is lowercase. + if not hasattr(builtins, "sentinel"): + record("PEP 661 sentinel", SKIP, "builtin absent") + return + try: + missing = builtins.sentinel("MISSING") + # Sanity: repr is stable and identity-comparable to itself. + ok = missing is missing and "MISSING" in repr(missing) + record("PEP 661 sentinel", PASS if ok else FAIL, repr(missing)) + except Exception as exc: # noqa: BLE001 - feature probe + record("PEP 661 sentinel", FAIL, repr(exc)) def probe_pep799_profiling() -> None: - # PEP 799: dedicated 'profiling' package + Tachyon sampling profiler. - if _spec_exists("profiling"): - sub = next((s for s in ("profiling.sampling", "profiling.tachyon") - if _spec_exists(s)), "") - record("PEP 799 profiling/Tachyon", PASS, sub or "package present") - else: + # PEP 799: dedicated `profiling` package. Tachyon (the sampling profiler) + # IS `profiling.sampling`. + # `profiling.tracing` is the relocated cProfile (cProfile remains as alias). + if not _spec_exists("profiling"): record("PEP 799 profiling/Tachyon", SKIP, "package absent") + return + subs = [s for s in ("profiling.sampling", "profiling.tracing") + if _spec_exists(s)] + if subs: + record("PEP 799 profiling/Tachyon", PASS, ", ".join(subs)) + else: + record("PEP 799 profiling/Tachyon", FAIL, + "package present but sampling/tracing missing") def probe_typing_features() -> None: - # PEP 747 TypeForm, PEP 728 TypedDict extra_items, PEP 800 disjoint bases. + # PEP 747 TypeForm — annotation for values that are themselves type exprs. import typing record("PEP 747 TypeForm", PASS if hasattr(typing, "TypeForm") else SKIP, "typing.TypeForm") - # PEP 728: probe by constructing a TypedDict accepting extra_items kw. + + # PEP 728 TypedDict extra_items: functional keyword form. Introspect via + # __extra_items__ (default: typing.NoExtraItems sentinel, not None). + # Passing both closed= and extra_items= raises TypeError at runtime. try: - typing.TypedDict("X", {"a": int}, extra_items=int) # type: ignore[call-arg] - record("PEP 728 TypedDict extra_items", PASS, "extra_items accepted") - except TypeError: - record("PEP 728 TypedDict extra_items", SKIP, "extra_items rejected") + td = typing.TypedDict("X", {"a": int}, extra_items=int) # type: ignore[call-arg] + no_extra = getattr(typing, "NoExtraItems", None) + extras_ok = getattr(td, "__extra_items__", no_extra) is int + default_ok = no_extra is not None + record("PEP 728 TypedDict extra_items", + PASS if (extras_ok and default_ok) else FAIL, + f"extra_items=int accepted, NoExtraItems={'ok' if default_ok else 'missing'}") + except TypeError as exc: + record("PEP 728 TypedDict extra_items", SKIP, f"rejected: {exc}") + + # PEP 800: `@typing.disjoint_base` — a CLASS DECORATOR, not a flag/attr. + # Attribute-existence is a valid capability probe; note in detail that + # semantically it's a decorator so downstream code should apply it, not read it. + has_db = hasattr(typing, "disjoint_base") record("PEP 800 disjoint bases", - PASS if hasattr(typing, "disjoint_base") else SKIP, - "typing.disjoint_base") + PASS if has_db else SKIP, + "typing.disjoint_base decorator" if has_db else "absent") + + +def probe_pep831_frame_pointers() -> None: + # PEP 831: -fno-omit-frame-pointer enabled by default on supporting platforms. + # No dedicated sysconfig variable — grep the compiler flags. Reflects build + # config, not runtime state. Opt-out is --without-frame-pointers at configure. + cflags = sysconfig.get_config_var("CFLAGS") or "" + if "-fno-omit-frame-pointer" in cflags: + record("PEP 831 frame pointers", PASS, "-fno-omit-frame-pointer in CFLAGS") + else: + # On Windows and some cross-compiles the flag simply doesn't apply. + record("PEP 831 frame pointers", SKIP, "not present in CFLAGS") + + +def probe_pep829_startup_config() -> None: + # PEP 829: `.start` files + site.StartupState. `.start` entries are + # `pkg.mod:callable` specs resolved by pkgutil.resolve_name and invoked + # at interpreter startup by site. Only Python-visible probe is StartupState. + record("PEP 829 startup config", + PASS if hasattr(site, "StartupState") else SKIP, + "site.StartupState") def probe_build_variant_info() -> None: # Informational: free-threading (PEP 703/793) and JIT state for this build. - gil_disabled = sysconfig.get_config_var("Py_GIL_DISABLED") + # NOTE: Py_GIL_DISABLED is DEFINED AS 0 on non-FT Windows builds — using + # `is not None` would incorrectly report FT on those. Coerce to bool. + gil_disabled = bool(sysconfig.get_config_var("Py_GIL_DISABLED")) is_gil = getattr(sys, "_is_gil_enabled", lambda: None)() record("free-threaded build (info)", SKIP, f"Py_GIL_DISABLED={gil_disabled} gil_enabled={is_gil}") + + # JIT: sys._jit exposes THREE methods. is_enabled() is the most meaningful + # ("JIT actually on"); is_active() is documented as unreliable outside JIT + # self-tests. The JIT is OFF BY DEFAULT — is_available() can be True while + # is_enabled() is False. Enable at runtime with PYTHON_JIT=1 if compiled in. jit = getattr(sys, "_jit", None) if jit is not None: avail = getattr(jit, "is_available", lambda: "?")() + enabled = getattr(jit, "is_enabled", lambda: "?")() active = getattr(jit, "is_active", lambda: "?")() - record("JIT (info)", SKIP, f"available={avail} active={active}") + record("JIT (info)", SKIP, + f"available={avail} enabled={enabled} active={active}") else: record("JIT (info)", SKIP, "sys._jit absent") def probe_cabi_notes() -> None: - # PEP 782 PyBytesWriter and PEP 803/820/793 free-threaded stable ABI are - # C-API surfaces; they cannot be exercised from a pure-Python test without - # compiling an extension. Recorded as N/A for visibility. + # PEP 782 PyBytesWriter and PEP 803/820/793 free-threaded stable ABI (abi3t) + # are C-API surfaces; they cannot be exercised from a pure-Python test + # without compiling an extension. Recorded as N/A for visibility. record("PEP 782 PyBytesWriter (C-API)", SKIP, "needs C ext to test") - record("PEP 803/820 free-threaded ABI (C-API)", SKIP, "needs C ext to test") + record("PEP 803/820/793 abi3t (C-API)", SKIP, "needs C ext to test") # --------------------------------------------------------------------------- # @@ -236,6 +321,8 @@ def main() -> int: probe_pep661_sentinel() probe_pep799_profiling() probe_typing_features() + probe_pep831_frame_pointers() + probe_pep829_startup_config() probe_build_variant_info() probe_cabi_notes() else: @@ -246,13 +333,16 @@ def main() -> int: width = max(len(r.name) for r in _results) print("\n=== Python 3.15 conda-build feature test ===") print(f"interpreter: {sys.executable}") - print(f"strict mode: {STRICT}\n") + print(f"releaselevel: {sys.version_info.releaselevel}") + print(f"strict mode: {STRICT} " + f"(env={STRICT_ENV}, auto={AUTO_STRICT})\n") for r in _results: tag = "[HARD]" if r.hard else "[soft]" print(f"{tag} {r.status:<4} {r.name.ljust(width)} {r.detail}") hard_failed = [r for r in _results if r.hard and r.status == FAIL] soft_failed = [r for r in _results if not r.hard and r.status == FAIL] + soft_skipped = [r for r in _results if not r.hard and r.status == SKIP] print() print(f"summary: {sum(r.status == PASS for r in _results)} pass / " @@ -263,6 +353,12 @@ def main() -> int: return 1 if STRICT and soft_failed: return 2 + # In auto-strict (rc1+), a SKIP on a probe that should have landed is also + # a signal — but we deliberately don't fail on skip to keep the surface + # small. Emit a warning so it shows up in CI logs. + if AUTO_STRICT and soft_skipped: + print(f"WARNING: {len(soft_skipped)} SOFT probes SKIPPED at " + f"releaselevel={sys.version_info.releaselevel}; review probes.") return 0 From 873ba6ca538243e618087efa7dc6b9653e4ac3a0 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Thu, 2 Jul 2026 10:24:23 +0000 Subject: [PATCH 19/30] Clean up --- recipe/run_test_py315.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/run_test_py315.py b/recipe/run_test_py315.py index 3e5324066..63a297492 100644 --- a/recipe/run_test_py315.py +++ b/recipe/run_test_py315.py @@ -10,7 +10,7 @@ # are frozen at the RC boundary per PEP 790, so a SKIP after that date # means we're building against a stale probe). # -# Sources (see docs/tools/python-3.15-probe-audit.md for the full audit): +# Sources: # - Python 3.15 What's New: https://docs.python.org/3.15/whatsnew/3.15.html # - PEP 790 (release schedule): https://peps.python.org/pep-0790/ — RC1 2026-08-04 # - PEP-specific references embedded in each probe below. From 7774f282c1035b66d9933954ae104dffe257f261 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Thu, 2 Jul 2026 10:31:28 +0000 Subject: [PATCH 20/30] Use a labeled testing channel --- abs.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/abs.yaml b/abs.yaml index ea6582d92..9332aefde 100644 --- a/abs.yaml +++ b/abs.yaml @@ -5,5 +5,6 @@ build_parameters: - "--error-overlinking" - "--error-overdepending" +# Upload all testing artifacts on a labeled testing channel: ad-testing/label/py315 upload_channels: - - ad-testing + ad-testing: py315 From e3f08b6b96caec939bbe62975da19044918f9d3d Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Thu, 2 Jul 2026 10:37:51 +0000 Subject: [PATCH 21/30] Fix a labeled testing channel --- abs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abs.yaml b/abs.yaml index 9332aefde..30d8cda32 100644 --- a/abs.yaml +++ b/abs.yaml @@ -7,4 +7,4 @@ build_parameters: # Upload all testing artifacts on a labeled testing channel: ad-testing/label/py315 upload_channels: - ad-testing: py315 +- ad-testing/label/py314 From 4e08f3ae7676ad16efa51dd78971f4e0b89b04f4 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Thu, 2 Jul 2026 12:38:54 +0000 Subject: [PATCH 22/30] Refreash the patch 0016 --- recipe/patches/0016-unvendor-zlib.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipe/patches/0016-unvendor-zlib.patch b/recipe/patches/0016-unvendor-zlib.patch index 222fd8eff..c11043497 100644 --- a/recipe/patches/0016-unvendor-zlib.patch +++ b/recipe/patches/0016-unvendor-zlib.patch @@ -30,7 +30,8 @@ index b455b3089ca..00e29eae266 100644 $(GeneratedJitStencilsDir);%(AdditionalIncludeDirectories) _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) _Py_HAVE_ZLIB;%(PreprocessorDefinitions) -@@ -113,8 +113,8 @@ +@@ -112,9 +112,9 @@ + Py_REMOTE_DEBUG;%(PreprocessorDefinitions) Py_STACKREF_DEBUG;%(PreprocessorDefinitions) From fe2b51349f693df89db11e4d569f779f235e26f2 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Thu, 2 Jul 2026 13:17:42 +0000 Subject: [PATCH 23/30] Fix the label --- abs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abs.yaml b/abs.yaml index 30d8cda32..31c3d0cba 100644 --- a/abs.yaml +++ b/abs.yaml @@ -7,4 +7,4 @@ build_parameters: # Upload all testing artifacts on a labeled testing channel: ad-testing/label/py315 upload_channels: -- ad-testing/label/py314 +- ad-testing/label/py315 From e867ab7471dd2cab5c4e09d5641b0f1728485596 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Fri, 3 Jul 2026 11:00:16 +0000 Subject: [PATCH 24/30] Add the patch 0023 to link xxlimited* to correct stable ABI DLL on freethreading --- recipe/build_base.bat | 15 ---- recipe/meta.yaml | 1 + recipe/patches/0016-unvendor-zlib.patch | 46 ++++++------ ...imited-freethreading-stable-abi-link.patch | 74 +++++++++++++++++++ 4 files changed, 98 insertions(+), 38 deletions(-) create mode 100644 recipe/patches/0026-xxlimited-freethreading-stable-abi-link.patch diff --git a/recipe/build_base.bat b/recipe/build_base.bat index cc7edd70c..a1eb17557 100644 --- a/recipe/build_base.bat +++ b/recipe/build_base.bat @@ -90,21 +90,6 @@ for %%x in (python%VERNODOTS%%THREAD%%_D%.dll python3%THREAD%%_D%.dll python%EXE ) ) -:: Free-threaded builds emit both python3t.dll (interpreter) and python3.dll (stable ABI -:: shim for limited-API extensions). The loop above stages python3t.dll via -:: python3%THREAD%.dll; xxlimited*.pyd and other Py_LIMITED_API modules still import -:: python3.dll — conda-build overlinking fails if it is not copied into %PREFIX%: -:: ERROR (python,DLLs/xxlimited_3_13.cp315t-win_amd64.pyd): $RPATH/python3.dll not found in packages, sysroot(s) nor the missing_dso_whitelist. -:: ERROR (python,DLLs/xxlimited.cp315t-win_amd64.pyd): $RPATH/python3.dll not found in packages, sysroot(s) nor the missing_dso_whitelist. -:: ERROR (python,DLLs/xxlimited_35.cp315t-win_amd64.pyd): $RPATH/python3.dll not found in packages, sysroot(s) nor the missing_dso_whitelist. -if "%PY_GIL_DISABLED%" == "yes" ( - if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\python3%_D%.dll ( - copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\python3%_D%.dll %PREFIX% - ) else ( - echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\python3%_D%.dll does not exist" - ) -) - for %%x in (python%_D%.pdb python%VERNODOTS%%_D%.pdb pythonw%_D%.pdb) do ( if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x ( copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x %PREFIX% diff --git a/recipe/meta.yaml b/recipe/meta.yaml index de9c55e95..030624bf7 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -93,6 +93,7 @@ source: - patches/0023-branding.patch - patches/0024-Unvendor-zlib-ng.patch - patches/0025-Unvendor-zstd.patch + - patches/0026-xxlimited-freethreading-stable-abi-link.patch # [win] build: number: {{ build_number }} diff --git a/recipe/patches/0016-unvendor-zlib.patch b/recipe/patches/0016-unvendor-zlib.patch index c11043497..eee74cdcf 100644 --- a/recipe/patches/0016-unvendor-zlib.patch +++ b/recipe/patches/0016-unvendor-zlib.patch @@ -1,18 +1,18 @@ -From bf303d3b27688d62fe6a55fe7e32ee6c54b8d670 Mon Sep 17 00:00:00 2001 -From: Isuru Fernando -Date: Wed, 29 Sep 2021 15:21:55 -0700 -Subject: [PATCH 16/24] unvendor zlib - ---- - PCbuild/pythoncore.vcxproj | 8 ++-- - PCbuild/pythoncore.vcxproj.filters | 66 ------------------------------ - 2 files changed, 4 insertions(+), 70 deletions(-) - -diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj -index b455b3089ca..00e29eae266 100644 ---- a/PCbuild/pythoncore.vcxproj -+++ b/PCbuild/pythoncore.vcxproj -@@ -82,7 +82,7 @@ +From bf303d3b27688d62fe6a55fe7e32ee6c54b8d670 Mon Sep 17 00:00:00 2001 +From: Isuru Fernando +Date: Wed, 29 Sep 2021 15:21:55 -0700 +Subject: [PATCH 16/24] unvendor zlib + +--- + PCbuild/pythoncore.vcxproj | 8 ++-- + PCbuild/pythoncore.vcxproj.filters | 66 ------------------------------ + 2 files changed, 4 insertions(+), 70 deletions(-) + +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index b455b3089ca..00e29eae266 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -82,7 +82,7 @@ true true @@ -21,7 +21,7 @@ index b455b3089ca..00e29eae266 100644 false -@@ -101,7 +101,7 @@ +@@ -101,7 +101,7 @@ /d1trimfile:%SRC_DIR% $(PySourcePath)Modules\_hacl;$(PySourcePath)Modules\_hacl\include;$(PySourcePath)Python;%(AdditionalIncludeDirectories) @@ -30,7 +30,7 @@ index b455b3089ca..00e29eae266 100644 $(GeneratedJitStencilsDir);%(AdditionalIncludeDirectories) _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) _Py_HAVE_ZLIB;%(PreprocessorDefinitions) -@@ -112,9 +112,9 @@ +@@ -112,9 +112,9 @@ Py_REMOTE_DEBUG;%(PreprocessorDefinitions) Py_STACKREF_DEBUG;%(PreprocessorDefinitions) @@ -42,11 +42,11 @@ index b455b3089ca..00e29eae266 100644 $(GeneratedJitStencilsDir)jit_shim-aarch64-pc-windows-msvc.o;%(AdditionalDependencies) $(GeneratedJitStencilsDir)jit_shim-i686-pc-windows-msvc.o;%(AdditionalDependencies) $(GeneratedJitStencilsDir)jit_shim-x86_64-pc-windows-msvc.o;%(AdditionalDependencies) -diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters -index 649ee1859ff..6fb1a6b5d0f 100644 ---- a/PCbuild/pythoncore.vcxproj.filters -+++ b/PCbuild/pythoncore.vcxproj.filters -@@ -939,39 +939,6 @@ +diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters +index 649ee1859ff..6fb1a6b5d0f 100644 +--- a/PCbuild/pythoncore.vcxproj.filters ++++ b/PCbuild/pythoncore.vcxproj.filters +@@ -939,39 +939,6 @@ Include\internal\mimalloc @@ -86,7 +86,7 @@ index 649ee1859ff..6fb1a6b5d0f 100644 Include\internal -@@ -1643,39 +1610,6 @@ +@@ -1643,39 +1610,6 @@ Objects diff --git a/recipe/patches/0026-xxlimited-freethreading-stable-abi-link.patch b/recipe/patches/0026-xxlimited-freethreading-stable-abi-link.patch new file mode 100644 index 000000000..535004b90 --- /dev/null +++ b/recipe/patches/0026-xxlimited-freethreading-stable-abi-link.patch @@ -0,0 +1,74 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Serhii Kupriienko +Date: Fri, 3 Jul 2026 00:00:00 +0000 +Subject: [PATCH] Link xxlimited* to correct stable ABI DLL on freethreading + +On Windows freethreading builds, upstream ships python3t.dll only (not +python3.dll). Unconditional ProjectReference to python3dll.vcxproj makes +xxlimited*.pyd import python3.dll and fail conda-build overlinking. + +- xxlimited: link python3tdll when DisableGil, else python3dll +- xxlimited_35 / xxlimited_3_13: link pythoncore when DisableGil (no + Py_LIMITED_API in source), else python3dll +--- + PCbuild/xxlimited.vcxproj | 4 ++-- + PCbuild/xxlimited_35.vcxproj | 7 ++++--- + PCbuild/xxlimited_3_13.vcxproj | 6 +++++- + 3 files changed, 11 insertions(+), 6 deletions(-) + +diff --git a/PCbuild/xxlimited.vcxproj b/PCbuild/xxlimited.vcxproj +index f0c36166001..725ae64f897 100644 +--- a/PCbuild/xxlimited.vcxproj ++++ b/PCbuild/xxlimited.vcxproj +@@ -101,10 +101,10 @@ + + + +- ++ + {885d4898-d08d-4091-9c40-c700cfe3fc5a} + +- ++ + {947BB5F5-6025-4A4F-8182-1B175469F8D2} + + +diff --git a/PCbuild/xxlimited_35.vcxproj b/PCbuild/xxlimited_35.vcxproj +index bfaf4e25366..2c3e1076fad 100644 +--- a/PCbuild/xxlimited_35.vcxproj ++++ b/PCbuild/xxlimited_35.vcxproj +@@ -101,11 +101,12 @@ + + + +- ++ + {885d4898-d08d-4091-9c40-c700cfe3fc5a} + +- +- {947BB5F5-6025-4A4F-8182-1B175469F8D2} ++ ++ {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} ++ false + + + +diff --git a/PCbuild/xxlimited_3_13.vcxproj b/PCbuild/xxlimited_3_13.vcxproj +index 7a9760fd431..ec31d3e1b37 100644 +--- a/PCbuild/xxlimited_3_13.vcxproj ++++ b/PCbuild/xxlimited_3_13.vcxproj +@@ -101,9 +101,13 @@ + + + +- ++ + {885d4898-d08d-4091-9c40-c700cfe3fc5a} + ++ ++ {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} ++ false ++ + + + From dc40711c1ea179053e638e85d84abe3df1a3e967 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Mon, 6 Jul 2026 09:27:31 +0000 Subject: [PATCH 25/30] Modify the 0026 patch about deriving the work from the upstream python/cpython#148912 (gh-148690) --- ...imited-freethreading-stable-abi-link.patch | 78 +++++++++++-------- 1 file changed, 45 insertions(+), 33 deletions(-) diff --git a/recipe/patches/0026-xxlimited-freethreading-stable-abi-link.patch b/recipe/patches/0026-xxlimited-freethreading-stable-abi-link.patch index 535004b90..246dc2d3a 100644 --- a/recipe/patches/0026-xxlimited-freethreading-stable-abi-link.patch +++ b/recipe/patches/0026-xxlimited-freethreading-stable-abi-link.patch @@ -1,26 +1,38 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Serhii Kupriienko -Date: Fri, 3 Jul 2026 00:00:00 +0000 -Subject: [PATCH] Link xxlimited* to correct stable ABI DLL on freethreading - -On Windows freethreading builds, upstream ships python3t.dll only (not -python3.dll). Unconditional ProjectReference to python3dll.vcxproj makes -xxlimited*.pyd import python3.dll and fail conda-build overlinking. - -- xxlimited: link python3tdll when DisableGil, else python3dll -- xxlimited_35 / xxlimited_3_13: link pythoncore when DisableGil (no - Py_LIMITED_API in source), else python3dll ---- - PCbuild/xxlimited.vcxproj | 4 ++-- - PCbuild/xxlimited_35.vcxproj | 7 ++++--- - PCbuild/xxlimited_3_13.vcxproj | 6 +++++- - 3 files changed, 11 insertions(+), 6 deletions(-) - -diff --git a/PCbuild/xxlimited.vcxproj b/PCbuild/xxlimited.vcxproj -index f0c36166001..725ae64f897 100644 ---- a/PCbuild/xxlimited.vcxproj -+++ b/PCbuild/xxlimited.vcxproj -@@ -101,10 +101,10 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Serhii Kupriienko +Date: Fri, 3 Jul 2026 00:00:00 +0000 +Subject: [PATCH] Link xxlimited* to correct stable ABI DLL on freethreading + +On Windows freethreading builds, upstream ships python3t.dll only (not +python3.dll). Unconditional ProjectReference to python3dll.vcxproj makes +xxlimited*.pyd import python3.dll and fail conda-build overlinking. + +The DisableGil-conditioned ProjectReference pattern is partially derived +from python/cpython#148912 (gh-148690, Petr Viktorin). We arrived at the +same linkage problem independently via conda-build overlinking on +v3.15.0b3, but the conditional MSBuild approach matches that upstream work. + +Adaptations for this feedstock (v3.15.0b3, not a straight cherry-pick): + +- xxlimited: gate existing python3dll / python3tdll refs on DisableGil + (upstream 3.15.0b3 already lists both; #148912 added python3tdll) +- xxlimited_35 / xxlimited_3_13: link pythoncore when DisableGil (no + Py_LIMITED_API in freethreaded source), else python3dll — differs from + #148912, which linked xxlimited_35 against python3tdll +- xxlimited_3_13: not touched in #148912; added here for the same reason + +Co-authored-by: Petr Viktorin +--- + PCbuild/xxlimited.vcxproj | 4 ++-- + PCbuild/xxlimited_35.vcxproj | 7 ++++--- + PCbuild/xxlimited_3_13.vcxproj | 6 +++++- + 3 files changed, 11 insertions(+), 6 deletions(-) + +diff --git a/PCbuild/xxlimited.vcxproj b/PCbuild/xxlimited.vcxproj +index f0c36166001..725ae64f897 100644 +--- a/PCbuild/xxlimited.vcxproj ++++ b/PCbuild/xxlimited.vcxproj +@@ -101,10 +101,10 @@ @@ -33,11 +45,11 @@ index f0c36166001..725ae64f897 100644 {947BB5F5-6025-4A4F-8182-1B175469F8D2} -diff --git a/PCbuild/xxlimited_35.vcxproj b/PCbuild/xxlimited_35.vcxproj -index bfaf4e25366..2c3e1076fad 100644 ---- a/PCbuild/xxlimited_35.vcxproj -+++ b/PCbuild/xxlimited_35.vcxproj -@@ -101,11 +101,12 @@ +diff --git a/PCbuild/xxlimited_35.vcxproj b/PCbuild/xxlimited_35.vcxproj +index bfaf4e25366..2c3e1076fad 100644 +--- a/PCbuild/xxlimited_35.vcxproj ++++ b/PCbuild/xxlimited_35.vcxproj +@@ -101,11 +101,12 @@ @@ -53,11 +65,11 @@ index bfaf4e25366..2c3e1076fad 100644 -diff --git a/PCbuild/xxlimited_3_13.vcxproj b/PCbuild/xxlimited_3_13.vcxproj -index 7a9760fd431..ec31d3e1b37 100644 ---- a/PCbuild/xxlimited_3_13.vcxproj -+++ b/PCbuild/xxlimited_3_13.vcxproj -@@ -101,9 +101,13 @@ +diff --git a/PCbuild/xxlimited_3_13.vcxproj b/PCbuild/xxlimited_3_13.vcxproj +index 7a9760fd431..ec31d3e1b37 100644 +--- a/PCbuild/xxlimited_3_13.vcxproj ++++ b/PCbuild/xxlimited_3_13.vcxproj +@@ -101,9 +101,13 @@ From 3e0d77b5fe6e6efa96a790308aa6f9373eb81278 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Wed, 8 Jul 2026 07:25:07 +0000 Subject: [PATCH 26/30] Address review comments --- recipe/build_base.bat | 1 + recipe/build_base.sh | 3 ++- recipe/conda_build_config.yaml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/recipe/build_base.bat b/recipe/build_base.bat index a1eb17557..89e4f1920 100644 --- a/recipe/build_base.bat +++ b/recipe/build_base.bat @@ -67,6 +67,7 @@ if "%PY_GIL_DISABLED%" == "yes" ( :: AP doesn't support PGO atm? set PGO= +:: TODO: remove once tk 9 is available on main :: Pin Tcl/Tk from the `tk` variant in conda_build_config.yaml (single source of :: truth, shared with build_base.sh). Upstream 3.15 tcltk.props defaults :: TclVersion to 9.0.3.0, but pkgs/main only ships tk 8.6; MSBuild derives the diff --git a/recipe/build_base.sh b/recipe/build_base.sh index 615fd05c3..580453b35 100644 --- a/recipe/build_base.sh +++ b/recipe/build_base.sh @@ -416,6 +416,7 @@ if [[ -f ${PREFIX}/bin/python${VER}m ]]; then fi ln -s ${PREFIX}/bin/python${VER} ${PREFIX}/bin/python ln -s ${PREFIX}/bin/pydoc${VER} ${PREFIX}/bin/pydoc +# TODO: It's still relevant for python 3.10. Consider removing this once we drop 3.10. # Workaround for https://github.com/conda/conda/issues/10969 - # specifically for conda<=4.10 # https://github.com/conda/conda/issues/11423#issuecomment-1104253815 @@ -480,7 +481,7 @@ pushd "${PREFIX}"/lib/python${VERABI} # Remove osx sysroot as it depends on the build machine sed -i.bak "s@-isysroot @@g" sysconfigfile # make sure $CONDA_BUILD_SYSROOT is not empty ... - if [[ ${HOST} =~ .*darwin.* ]] && [[ -n ${CONDA_BUILD_SYSROOT} ]]; then + if [[ ${HOST} =~ .*darwin.* ]] && [[ -n ${CONDA_BUILD_SYSROOT} ]]; then sed -i.bak "s@$CONDA_BUILD_SYSROOT @@g" sysconfigfile fi # Remove unfilled config option diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index b8c77e32c..f7a8660d0 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -7,4 +7,4 @@ numpy: gil_type: - normal # Will be enabled as part of https://anaconda.atlassian.net/browse/PKG-5855 - - disabled # [not (s390x or (osx and x86_64))] + - disabled From 4276b7a96a2a7b85191aa6ae6c98348c1fa7a362 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Wed, 8 Jul 2026 07:36:03 +0000 Subject: [PATCH 27/30] Remove staging py315 specific tests --- recipe/meta.yaml | 3 - recipe/run_test.py | 5 + recipe/run_test_py315.py | 366 --------------------------------------- 3 files changed, 5 insertions(+), 369 deletions(-) delete mode 100644 recipe/run_test_py315.py diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 030624bf7..bc1ee2e20 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -248,7 +248,6 @@ outputs: - tests/cython/* - tests/prefix-replacement/* - run_test.py - - run_test_py315.py commands: - echo on # [win] - set # [win] @@ -302,8 +301,6 @@ outputs: - popd - popd - python run_test.py - - export RUN_TEST_REQUIRE_315=1 && python run_test_py315.py # [unix] - - set RUN_TEST_REQUIRE_315=1 && python run_test_py315.py # [win] - test ! -f default.profraw # [osx] # Test workaround for https://github.com/conda/conda/issues/10969 - python3.1 --version # [unix] diff --git a/recipe/run_test.py b/recipe/run_test.py index 97f9dc3fc..132c270a3 100644 --- a/recipe/run_test.py +++ b/recipe/run_test.py @@ -12,6 +12,11 @@ else: osx105 = False +# Build sanity: test env must point at the conda prefix we just built. +assert sys.prefix and os.path.isdir(sys.prefix), f"invalid prefix: {sys.prefix!r}" +print('sys.prefix:', sys.prefix) +print('sys.abiflags:', getattr(sys, 'abiflags', '')) + print('sys.version:', sys.version) print('sys.platform:', sys.platform) print('tuple.__itemsize__:', tuple.__itemsize__) diff --git a/recipe/run_test_py315.py b/recipe/run_test_py315.py deleted file mode 100644 index 63a297492..000000000 --- a/recipe/run_test_py315.py +++ /dev/null @@ -1,366 +0,0 @@ -# Python 3.15 conda-build feature test — verified against 3.15.0b3 (2026 series). -# -# Design contract: -# - HARD checks (interpreter identity, core stdlib, ABI/build sanity) -> failure -# fails the conda-build test phase (non-zero exit). -# - SOFT checks (new PEP feature probes) -> reported as PASS/SKIP, never fail -# the build UNLESS one of: -# * RUN_TEST_STRICT=1 in the environment (manual promote SOFT->HARD), or -# * we are running on rc1 or later (auto-promote — PEP feature spellings -# are frozen at the RC boundary per PEP 790, so a SKIP after that date -# means we're building against a stale probe). -# -# Sources: -# - Python 3.15 What's New: https://docs.python.org/3.15/whatsnew/3.15.html -# - PEP 790 (release schedule): https://peps.python.org/pep-0790/ — RC1 2026-08-04 -# - PEP-specific references embedded in each probe below. - -from __future__ import annotations - -import builtins -import importlib.util -import os -import platform -import site -import sys -import sysconfig -from dataclasses import dataclass - -PASS, SKIP, FAIL = "PASS", "SKIP", "FAIL" -TARGET_VERSION = (3, 15) -IS_TARGET = sys.version_info[:2] == TARGET_VERSION - -# Manual override for local development / CI hardening. -STRICT_ENV = os.environ.get("RUN_TEST_STRICT", "0") == "1" - -# Auto-promote at rc1 — after 2026-08-04 the PEP APIs are frozen and any SKIP -# from a feature probe means the probe is stale, not that the feature is absent. -# Rationale: probes are advisory during beta only. -AUTO_STRICT = IS_TARGET and sys.version_info.releaselevel != "beta" -STRICT = STRICT_ENV or AUTO_STRICT - -# For the dedicated python-3.15 feedstock, set RUN_TEST_REQUIRE_315=1 so a -# non-3.15 interpreter is a HARD failure instead of a skip (catches bad matrices). -REQUIRE_TARGET = os.environ.get("RUN_TEST_REQUIRE_315", "0") == "1" - - -@dataclass -class Result: - name: str - status: str - detail: str = "" - hard: bool = False # if True, a FAIL aborts the test phase - - -_results: list[Result] = [] - - -def record(name: str, status: str, detail: str = "", *, hard: bool = False) -> None: - _results.append(Result(name, status, detail, hard)) - - -def _spec_exists(modname: str) -> bool: - # `find_spec` is safer than `import` — it does not execute module top-level - # code, which matters for probes on packages that may hold heavy imports. - try: - return importlib.util.find_spec(modname) is not None - except (ImportError, ValueError): - return False - - -def _compiles(src: str) -> bool: - # Probe a syntax-level PEP without executing it. - try: - compile(src, "", "exec") - return True - except SyntaxError: - return False - - -# --------------------------------------------------------------------------- # -# HARD checks — must hold for any correct 3.15 build -# --------------------------------------------------------------------------- # - -def check_interpreter_identity() -> None: - ver = (f"{platform.python_version()} " - f"({sys.version_info.releaselevel} {sys.version_info.serial})") - if IS_TARGET: - record("interpreter 3.15", PASS, ver, hard=True) - elif REQUIRE_TARGET: - record("interpreter 3.15", FAIL, - f"expected 3.15, got {sys.version_info[0]}.{sys.version_info[1]}", - hard=True) - else: - record("interpreter 3.15", SKIP, f"not target ({ver}) -> probes skipped") - - -def check_core_stdlib() -> None: - # C-extension stdlib modules are the usual silent-failure surface: a build - # that lacks system libs (ssl/lzma/sqlite/...) imports the pure parts fine - # but breaks at runtime. Importing them here turns that into a build failure. - required = ["ssl", "ctypes", "sqlite3", "lzma", "bz2", "zlib", - "hashlib", "decimal", "readline", "curses"] - missing = [] - for mod in required: - # readline/curses are absent on Windows by design. - if os.name == "nt" and mod in {"readline", "curses"}: - continue - try: - __import__(mod) - except ImportError as exc: - missing.append(f"{mod} ({exc})") - if missing: - record("core C-extension stdlib", FAIL, "; ".join(missing), hard=True) - else: - record("core C-extension stdlib", PASS, "all importable", hard=True) - - -def check_build_sanity() -> None: - # Cross-check the build prefix matches the test env's interpreter. - prefix_ok = sys.prefix and os.path.isdir(sys.prefix) - abiflags = getattr(sys, "abiflags", "") - record( - "build sanity", - PASS if prefix_ok else FAIL, - f"prefix={sys.prefix} abiflags='{abiflags}'", - hard=True, - ) - - -# --------------------------------------------------------------------------- # -# SOFT probes — 3.15 new features (verified against b3; frozen at rc1) -# --------------------------------------------------------------------------- # - -def probe_pep686_utf8_default() -> None: - # PEP 686: UTF-8 is the unconditional default in 3.15 (independent of locale). - # Behavioral change is most visible on Windows; on POSIX with UTF-8 locales - # it was already effectively UTF-8. sys.flags.utf8_mode == 1 by default now. - mode = getattr(sys.flags, "utf8_mode", None) - if mode == 1: - record("PEP 686 UTF-8 default", PASS, "sys.flags.utf8_mode=1") - else: - record("PEP 686 UTF-8 default", SKIP, f"utf8_mode={mode}") - - -def probe_pep810_lazy_imports() -> None: - # PEP 810: `lazy` soft keyword — module-scope only. Syntax alone enables it; - # no __future__ import is required. Belt-and-suspenders: compile probe AND - # a runtime attribute (sys.set_lazy_imports) that also lands in 3.15. - compile_ok = _compiles("lazy import os\n") - runtime_ok = hasattr(sys, "set_lazy_imports") - if compile_ok and runtime_ok: - record("PEP 810 lazy imports", PASS, "syntax + sys.set_lazy_imports") - elif compile_ok or runtime_ok: - record("PEP 810 lazy imports", PASS, - f"partial: compile={compile_ok} runtime={runtime_ok}") - else: - record("PEP 810 lazy imports", SKIP, "neither syntax nor runtime API") - - -def probe_pep798_unpack_comprehension() -> None: - # PEP 798: unpacking in comprehensions. NOTE: unbracketed genexp-call form - # `f(*x for x in xs)` still raises SyntaxError — do not probe that here. - src = "result = [*xs for xs in [[1, 2], [3]]]" - if not _compiles(src): - record("PEP 798 unpack-in-comprehension", SKIP, "syntax not accepted") - return - ns: dict = {} - try: - exec(src, ns) - ok = ns.get("result") == [1, 2, 3] - record("PEP 798 unpack-in-comprehension", - PASS if ok else FAIL, f"result={ns.get('result')}") - except Exception as exc: # noqa: BLE001 - feature probe - record("PEP 798 unpack-in-comprehension", FAIL, repr(exc)) - - -def probe_pep814_frozendict() -> None: - # PEP 814: `frozendict` is a true BUILTIN (not types.frozendict). - # Also NOT a subclass of dict — inherits directly from object; use - # isinstance(x, (dict, frozendict)) or collections.abc.Mapping in consumers. - if not hasattr(builtins, "frozendict"): - record("PEP 814 frozendict", SKIP, "builtin absent") - return - fd = builtins.frozendict({"a": 1}) - # Sanity: constructs, hashable, not a dict subclass. - ok = hash(fd) is not None and not isinstance(fd, dict) - record("PEP 814 frozendict", - PASS if ok else FAIL, - f"hashable={ok}, not dict-subclass={not isinstance(fd, dict)}") - - -def probe_pep661_sentinel() -> None: - # PEP 661: `sentinel` is a BUILTIN lowercase callable — sentinel("NAME"). - # NOT a module import. The typing_extensions backport is capital-S Sentinel, - # but the 3.15 builtin is lowercase. - if not hasattr(builtins, "sentinel"): - record("PEP 661 sentinel", SKIP, "builtin absent") - return - try: - missing = builtins.sentinel("MISSING") - # Sanity: repr is stable and identity-comparable to itself. - ok = missing is missing and "MISSING" in repr(missing) - record("PEP 661 sentinel", PASS if ok else FAIL, repr(missing)) - except Exception as exc: # noqa: BLE001 - feature probe - record("PEP 661 sentinel", FAIL, repr(exc)) - - -def probe_pep799_profiling() -> None: - # PEP 799: dedicated `profiling` package. Tachyon (the sampling profiler) - # IS `profiling.sampling`. - # `profiling.tracing` is the relocated cProfile (cProfile remains as alias). - if not _spec_exists("profiling"): - record("PEP 799 profiling/Tachyon", SKIP, "package absent") - return - subs = [s for s in ("profiling.sampling", "profiling.tracing") - if _spec_exists(s)] - if subs: - record("PEP 799 profiling/Tachyon", PASS, ", ".join(subs)) - else: - record("PEP 799 profiling/Tachyon", FAIL, - "package present but sampling/tracing missing") - - -def probe_typing_features() -> None: - # PEP 747 TypeForm — annotation for values that are themselves type exprs. - import typing - record("PEP 747 TypeForm", - PASS if hasattr(typing, "TypeForm") else SKIP, - "typing.TypeForm") - - # PEP 728 TypedDict extra_items: functional keyword form. Introspect via - # __extra_items__ (default: typing.NoExtraItems sentinel, not None). - # Passing both closed= and extra_items= raises TypeError at runtime. - try: - td = typing.TypedDict("X", {"a": int}, extra_items=int) # type: ignore[call-arg] - no_extra = getattr(typing, "NoExtraItems", None) - extras_ok = getattr(td, "__extra_items__", no_extra) is int - default_ok = no_extra is not None - record("PEP 728 TypedDict extra_items", - PASS if (extras_ok and default_ok) else FAIL, - f"extra_items=int accepted, NoExtraItems={'ok' if default_ok else 'missing'}") - except TypeError as exc: - record("PEP 728 TypedDict extra_items", SKIP, f"rejected: {exc}") - - # PEP 800: `@typing.disjoint_base` — a CLASS DECORATOR, not a flag/attr. - # Attribute-existence is a valid capability probe; note in detail that - # semantically it's a decorator so downstream code should apply it, not read it. - has_db = hasattr(typing, "disjoint_base") - record("PEP 800 disjoint bases", - PASS if has_db else SKIP, - "typing.disjoint_base decorator" if has_db else "absent") - - -def probe_pep831_frame_pointers() -> None: - # PEP 831: -fno-omit-frame-pointer enabled by default on supporting platforms. - # No dedicated sysconfig variable — grep the compiler flags. Reflects build - # config, not runtime state. Opt-out is --without-frame-pointers at configure. - cflags = sysconfig.get_config_var("CFLAGS") or "" - if "-fno-omit-frame-pointer" in cflags: - record("PEP 831 frame pointers", PASS, "-fno-omit-frame-pointer in CFLAGS") - else: - # On Windows and some cross-compiles the flag simply doesn't apply. - record("PEP 831 frame pointers", SKIP, "not present in CFLAGS") - - -def probe_pep829_startup_config() -> None: - # PEP 829: `.start` files + site.StartupState. `.start` entries are - # `pkg.mod:callable` specs resolved by pkgutil.resolve_name and invoked - # at interpreter startup by site. Only Python-visible probe is StartupState. - record("PEP 829 startup config", - PASS if hasattr(site, "StartupState") else SKIP, - "site.StartupState") - - -def probe_build_variant_info() -> None: - # Informational: free-threading (PEP 703/793) and JIT state for this build. - # NOTE: Py_GIL_DISABLED is DEFINED AS 0 on non-FT Windows builds — using - # `is not None` would incorrectly report FT on those. Coerce to bool. - gil_disabled = bool(sysconfig.get_config_var("Py_GIL_DISABLED")) - is_gil = getattr(sys, "_is_gil_enabled", lambda: None)() - record("free-threaded build (info)", SKIP, - f"Py_GIL_DISABLED={gil_disabled} gil_enabled={is_gil}") - - # JIT: sys._jit exposes THREE methods. is_enabled() is the most meaningful - # ("JIT actually on"); is_active() is documented as unreliable outside JIT - # self-tests. The JIT is OFF BY DEFAULT — is_available() can be True while - # is_enabled() is False. Enable at runtime with PYTHON_JIT=1 if compiled in. - jit = getattr(sys, "_jit", None) - if jit is not None: - avail = getattr(jit, "is_available", lambda: "?")() - enabled = getattr(jit, "is_enabled", lambda: "?")() - active = getattr(jit, "is_active", lambda: "?")() - record("JIT (info)", SKIP, - f"available={avail} enabled={enabled} active={active}") - else: - record("JIT (info)", SKIP, "sys._jit absent") - - -def probe_cabi_notes() -> None: - # PEP 782 PyBytesWriter and PEP 803/820/793 free-threaded stable ABI (abi3t) - # are C-API surfaces; they cannot be exercised from a pure-Python test - # without compiling an extension. Recorded as N/A for visibility. - record("PEP 782 PyBytesWriter (C-API)", SKIP, "needs C ext to test") - record("PEP 803/820/793 abi3t (C-API)", SKIP, "needs C ext to test") - - -# --------------------------------------------------------------------------- # - -def main() -> int: - # Universal sanity: runs on every Python version. - check_interpreter_identity() - check_core_stdlib() - check_build_sanity() - - # 3.15-only: PEP feature probes are skipped on any other version. - if IS_TARGET: - probe_pep686_utf8_default() - probe_pep810_lazy_imports() - probe_pep798_unpack_comprehension() - probe_pep814_frozendict() - probe_pep661_sentinel() - probe_pep799_profiling() - probe_typing_features() - probe_pep831_frame_pointers() - probe_pep829_startup_config() - probe_build_variant_info() - probe_cabi_notes() - else: - record("3.15 feature probes", SKIP, - f"interpreter {sys.version_info[0]}.{sys.version_info[1]} " - "is not 3.15") - - width = max(len(r.name) for r in _results) - print("\n=== Python 3.15 conda-build feature test ===") - print(f"interpreter: {sys.executable}") - print(f"releaselevel: {sys.version_info.releaselevel}") - print(f"strict mode: {STRICT} " - f"(env={STRICT_ENV}, auto={AUTO_STRICT})\n") - for r in _results: - tag = "[HARD]" if r.hard else "[soft]" - print(f"{tag} {r.status:<4} {r.name.ljust(width)} {r.detail}") - - hard_failed = [r for r in _results if r.hard and r.status == FAIL] - soft_failed = [r for r in _results if not r.hard and r.status == FAIL] - soft_skipped = [r for r in _results if not r.hard and r.status == SKIP] - - print() - print(f"summary: {sum(r.status == PASS for r in _results)} pass / " - f"{sum(r.status == SKIP for r in _results)} skip / " - f"{sum(r.status == FAIL for r in _results)} fail") - - if hard_failed: - return 1 - if STRICT and soft_failed: - return 2 - # In auto-strict (rc1+), a SKIP on a probe that should have landed is also - # a signal — but we deliberately don't fail on skip to keep the surface - # small. Emit a warning so it shows up in CI logs. - if AUTO_STRICT and soft_skipped: - print(f"WARNING: {len(soft_skipped)} SOFT probes SKIPPED at " - f"releaselevel={sys.version_info.releaselevel}; review probes.") - return 0 - - -if __name__ == "__main__": - raise SystemExit(main()) From 76da5b22089e93fddf03ead17a02c895756ae045 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Wed, 8 Jul 2026 07:44:48 +0000 Subject: [PATCH 28/30] Add a comment about vs2026 --- recipe/conda_build_config.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index f7a8660d0..932e24c94 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -8,3 +8,13 @@ gil_type: - normal # Will be enabled as part of https://anaconda.atlassian.net/browse/PKG-5855 - disabled + +# TODO: Windows tail-calling interpreter: 64-bit builds with Visual Studio 2026 (MSVC 18) can now use the tail-call interpreter (reported ~15–20% speedup). +# Official python.org Windows binaries now use it. +# We should consider adding vs2026 and use it for later builds. +# c_compiler: # [win] +# - vs2026 # [win] +# c_stdlib_version: # [win] +# - 2026.1 # [win] +# cxx_compiler: # [win] +# - vs2026 # [win] From b7ce89af09b40d50e89bfbb46542d2f8dd3182c1 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Thu, 9 Jul 2026 14:29:39 +0000 Subject: [PATCH 29/30] Win32: fix broken nuget download in find_python.bat. Set PYTHON_FOR_BUILD from the conda build env and patch find_python.bat after aka.ms/nugetclidl started redirecting to Bing instead of nuget.exe. Co-authored-by: Cursor --- recipe/build_base.bat | 3 ++ recipe/meta.yaml | 1 + ...-Win32-fix-broken-nuget-download-URL.patch | 35 +++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 recipe/patches/0027-Win32-fix-broken-nuget-download-URL.patch diff --git a/recipe/build_base.bat b/recipe/build_base.bat index 89e4f1920..5e2a7fe64 100644 --- a/recipe/build_base.bat +++ b/recipe/build_base.bat @@ -74,6 +74,9 @@ set PGO= :: lib names (tcl86t.lib/tk86t.lib) from the major.minor of these props. set TCLTK_MSBUILD_PROPS="/p:TclVersion=%tk%" "/p:TkVersion=%tk%" +:: PCbuild code-gen needs a host Python; prefer the conda build env over nuget. +if not defined PYTHON_FOR_BUILD set PYTHON_FOR_BUILD=%BUILD_PREFIX%\python.exe + cd PCbuild :: Twice because: diff --git a/recipe/meta.yaml b/recipe/meta.yaml index bc1ee2e20..37cf443dc 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -94,6 +94,7 @@ source: - patches/0024-Unvendor-zlib-ng.patch - patches/0025-Unvendor-zstd.patch - patches/0026-xxlimited-freethreading-stable-abi-link.patch # [win] + - patches/0027-Win32-fix-broken-nuget-download-URL.patch # [win] build: number: {{ build_number }} diff --git a/recipe/patches/0027-Win32-fix-broken-nuget-download-URL.patch b/recipe/patches/0027-Win32-fix-broken-nuget-download-URL.patch new file mode 100644 index 000000000..303b612e2 --- /dev/null +++ b/recipe/patches/0027-Win32-fix-broken-nuget-download-URL.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Serhii Kupriienko +Date: Thu, 9 Jul 2026 00:00:00 +0000 +Subject: [PATCH 27/27] Win32: fix broken nuget download URL + +https://aka.ms/nugetclidl now redirects to Bing instead of nuget.exe. +Use dist.nuget.org and ensure nuget.org is configured before installing +pythonx86 (cpython gh-152919). +--- + PCbuild/find_python.bat | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/PCbuild/find_python.bat b/PCbuild/find_python.bat +index 1111111..2222222 100644 +--- a/PCbuild/find_python.bat ++++ b/PCbuild/find_python.bat +@@ -55,7 +55,7 @@ + @set _Py_HOST_PYTHON=%HOST_PYTHON% + @if "%_Py_HOST_PYTHON%"=="" set _Py_HOST_PYTHON=py + @if "%_Py_NUGET%"=="" (set _Py_NUGET=%_Py_EXTERNALS_DIR%\nuget.exe) +-@if "%_Py_NUGET_URL%"=="" (set _Py_NUGET_URL=https://aka.ms/nugetclidl) ++@if "%_Py_NUGET_URL%"=="" (set _Py_NUGET_URL=https://dist.nuget.org/win-x86-commandline/latest/nuget.exe) + @if NOT exist "%_Py_NUGET%" ( + @if not "%_Py_Quiet%"=="1" @echo Downloading nuget... + @rem NB: Must use single quotes around NUGET here, NOT double! +@@ -66,6 +66,9 @@ + @%_Py_HOST_PYTHON% -E "%_Py_D%\urlretrieve.py" "%_Py_NUGET_URL%" "%_Py_NUGET%" + ) + ) ++ ++@rem ensure nuget.org source exist ++@"%_Py_NUGET%" sources add -Name nuget.org -Source https://api.nuget.org/v3/index.json >nul 2>nul + + @if not "%_Py_Quiet%"=="1" @echo Installing Python via nuget... + @if not "%_Py_Quiet%"=="1" ( From ffddaff68c587a647f2516b48a0ff36559eab5d1 Mon Sep 17 00:00:00 2001 From: Serhii Kupriienko Date: Thu, 9 Jul 2026 15:19:03 +0000 Subject: [PATCH 30/30] Win32: use CONDA_PYTHON_EXE instead of nuget for PCbuild. Set PYTHON from the conda build env (PR #238 pattern) and drop the find_python.bat patch plus PYTHON_FOR_BUILD workaround. Co-authored-by: Cursor --- recipe/build_base.bat | 6 ++-- recipe/meta.yaml | 1 - ...-Win32-fix-broken-nuget-download-URL.patch | 35 ------------------- 3 files changed, 3 insertions(+), 39 deletions(-) delete mode 100644 recipe/patches/0027-Win32-fix-broken-nuget-download-URL.patch diff --git a/recipe/build_base.bat b/recipe/build_base.bat index 5e2a7fe64..f1dcc136c 100644 --- a/recipe/build_base.bat +++ b/recipe/build_base.bat @@ -1,6 +1,9 @@ setlocal EnableDelayedExpansion echo on +:: Avoids fetching nuget.exe from the internet. +set PYTHON=%CONDA_PYTHON_EXE% + :: Compile python, extensions and external libraries if "%ARCH%"=="64" ( set PLATFORM=x64 @@ -74,9 +77,6 @@ set PGO= :: lib names (tcl86t.lib/tk86t.lib) from the major.minor of these props. set TCLTK_MSBUILD_PROPS="/p:TclVersion=%tk%" "/p:TkVersion=%tk%" -:: PCbuild code-gen needs a host Python; prefer the conda build env over nuget. -if not defined PYTHON_FOR_BUILD set PYTHON_FOR_BUILD=%BUILD_PREFIX%\python.exe - cd PCbuild :: Twice because: diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 37cf443dc..bc1ee2e20 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -94,7 +94,6 @@ source: - patches/0024-Unvendor-zlib-ng.patch - patches/0025-Unvendor-zstd.patch - patches/0026-xxlimited-freethreading-stable-abi-link.patch # [win] - - patches/0027-Win32-fix-broken-nuget-download-URL.patch # [win] build: number: {{ build_number }} diff --git a/recipe/patches/0027-Win32-fix-broken-nuget-download-URL.patch b/recipe/patches/0027-Win32-fix-broken-nuget-download-URL.patch deleted file mode 100644 index 303b612e2..000000000 --- a/recipe/patches/0027-Win32-fix-broken-nuget-download-URL.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Serhii Kupriienko -Date: Thu, 9 Jul 2026 00:00:00 +0000 -Subject: [PATCH 27/27] Win32: fix broken nuget download URL - -https://aka.ms/nugetclidl now redirects to Bing instead of nuget.exe. -Use dist.nuget.org and ensure nuget.org is configured before installing -pythonx86 (cpython gh-152919). ---- - PCbuild/find_python.bat | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/PCbuild/find_python.bat b/PCbuild/find_python.bat -index 1111111..2222222 100644 ---- a/PCbuild/find_python.bat -+++ b/PCbuild/find_python.bat -@@ -55,7 +55,7 @@ - @set _Py_HOST_PYTHON=%HOST_PYTHON% - @if "%_Py_HOST_PYTHON%"=="" set _Py_HOST_PYTHON=py - @if "%_Py_NUGET%"=="" (set _Py_NUGET=%_Py_EXTERNALS_DIR%\nuget.exe) --@if "%_Py_NUGET_URL%"=="" (set _Py_NUGET_URL=https://aka.ms/nugetclidl) -+@if "%_Py_NUGET_URL%"=="" (set _Py_NUGET_URL=https://dist.nuget.org/win-x86-commandline/latest/nuget.exe) - @if NOT exist "%_Py_NUGET%" ( - @if not "%_Py_Quiet%"=="1" @echo Downloading nuget... - @rem NB: Must use single quotes around NUGET here, NOT double! -@@ -66,6 +66,9 @@ - @%_Py_HOST_PYTHON% -E "%_Py_D%\urlretrieve.py" "%_Py_NUGET_URL%" "%_Py_NUGET%" - ) - ) -+ -+@rem ensure nuget.org source exist -+@"%_Py_NUGET%" sources add -Name nuget.org -Source https://api.nuget.org/v3/index.json >nul 2>nul - - @if not "%_Py_Quiet%"=="1" @echo Installing Python via nuget... - @if not "%_Py_Quiet%"=="1" (