forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 17
Update to v3.12.9 #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Update to v3.12.9 #186
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Алексей <[email protected]> Co-authored-by: lovetox <[email protected]>
Co-authored-by: Naveen M K <[email protected]> Co-authored-by: Алексей <[email protected]> Co-authored-by: Christoph Reiter <[email protected]>
This is used throughout the Python code but is not defined when compiling with Mingw-w64 compilers, so define it. In MSVC these are defined in PC/pyconfig.h, we have to define it manually because pyconfig.h is created by autotools. Co-authored-by: Алексей <[email protected]> Co-authored-by: Christoph Reiter <[email protected]> Co-authored-by: Naveen M K <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]> Co-authored-by: Christoph Reiter <[email protected]>
Largefile is supported on Windows. Co-authored-by: Naveen M K <[email protected]> Co-authored-by: Алексей <[email protected]> Co-authored-by: Christoph Reiter <[email protected]>
Co-authored-by: Naveen M K <[email protected]>
Also, build `nt` module instead of `posix` when compiling with MINGW. Co-authored-by: Naveen M K <[email protected]> Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]> Co-authored-by: Christoph Reiter <[email protected]> Co-authored-by: Naveen M K <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Naveen M K <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]> Co-authored-by: Naveen M K <[email protected]>
Co-authored-by: Алексей <[email protected]> Co-authored-by: Naveen M K <[email protected]>
This is the case used in MINGW Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]> Co-authored-by: Christoph Reiter <[email protected]>
Co-authored-by: Алексей <[email protected]> Co-authored-by: Christoph Reiter <[email protected]>
Co-authored-by: Алексей <[email protected]> Co-authored-by: Christoph Reiter <[email protected]> Co-authored-by: cat <[email protected]> Co-authored-by: Naveen M K <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]> Co-authored-by: Christoph Reiter <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]>
This is the default behavior on upstream Python. We previously reverted this behavior because it broke some use cases. The old behavior can be restored by setting the environment variable PYTHONLEGACYWINDOWSDLLLOADING to 1. Fixes #48 Also fixes #141 Signed-off-by: Naveen M K <[email protected]>
This provides the limited ABI as a separate DLL, forwarding to the real one. This makes linking with "-lpython3" work. Fixes #147
This looks for DLL names in the import table but while with MSVC the DLL is named python311.dll in our case it is named libpython3.11.dll. Adjust the strings and lengths accordingly.
It seems like in case the path passed to it is absolute, but contains forward slashes then LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR does not work and DLLs in the same directory as the extension are not considered. This occurs in our fork because in MSYS2-mode the extension loader will normalize to forward slashes before. Normalize everything to backslashes again before passing it to LoadLibraryExW. Fixes #151
…lues for `LIBDIR`
`ws2_32` is required when building that module
Generalize the `MINGW` case. In theory, it should be correct for other system too and would fix cross-compilation
llvm-mingw only has autoconf 2.69
Remove tests which are passing now, or no longer exist, and move tests which only fail with msvcrt into a separate file.
gcc 14 changed `incompatible-pointer-types` from warning to error for now, make it as warning to avoid build failure
so that it passes on mingw
Currently, the platform names are hardcoded in many places, and are not named consistently. This commit fixes it by standardizing the names to be returned by `sysconfig.get_platform`. The naming is based on #167 (comment) Similarly, `EXT_SUFFIX` is also standardized to be consistent with the platform names. Signed-off-by: Naveen M K <[email protected]>
`Rpc` should be `rpc`. It error's out in cross-compilation.
ensurepip no longer works since we implement PEP 668, so do everything in a venv.
…back By default venvlauncher only looks for python.exe in the python "home", which fails in the MSYS2 case where there could be multiple python versions in the same prefix i.e. python.exe could be 3.12 while the venv was created with python3.13.exe. Upstream CPython doesn't have this problem since they never have multiple Python versions in the same prefix. On the other hand the Python test suite (test_sysconfig specifically) creates a venv for the uninstalled Python build dir, where only python.exe exists. To cover both cases we first try to look for the python3.XY.exe and then fall back to python.exe.
lazka
added a commit
to lazka/MINGW-packages
that referenced
this pull request
Feb 6, 2025
lazka
added a commit
to msys2/MINGW-packages
that referenced
this pull request
Feb 6, 2025
For fun, here's a CI run with arm enabled: https://github.com/msys2-arm/cpython-mingw/actions/runs/13185094372 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
range-diff:
1: d46c08f = 1: d526d3b sysconfig: make _sysconfigdata.py relocatable
2: 2cf9610 ! 2: 82f8c24 build: add --with-nt-threads and make it default on mingw
3: 63d2c03 = 3: 2013a81 Define
MS_WINDOWS
(and others) when compiling with MINGW4: 2d52bf7 = 4: 1ad1104 configure: add
MACHDEP
andplatform
on MINGW5: fafd2e6 = 5: 0e2ce0f Add default configuration for MINGW
6: cbb6601 = 6: 80d81cc configure: enable largefile support by default for Mingw
7: f69aac6 = 7: 0a368ca Add
PC/
toCPPFLAGS
and toSRCDIRS
on Mingw8: 87107b3 = 8: e8d1091 posixmodule.c: Define necessary headers for compiling on MINGW
9: fb135fa = 9: 7d6077a Build winreg by default when compiling for MINGW
10: 8444575 = 10: 5a205ed pyport.h: Add support for MINGW
11: afcbedc = 11: 1586be1 configure: add options so that shared build is possible on MINGW
12: 1a8904b = 12: b613786 Add dynamic loading support for MINGW
13: dfa4ee5 = 13: 0a4c786 Ignore main program for frozen scripts on MINGW
14: 6d12c13 = 14: 6c1ca5d Detect winsock2 and setup _socket module on MINGW
15: a201e39 = 15: e06b8d1 Enable some windows specific modules
16: dfe9616 = 16: 9670e32 sysconfig: MINGW build extensions with GCC
17: 2fb593b = 17: d0d223d sysconfig: treat MINGW builds as POSIX builds
18: bf6a8b5 = 18: a5d2b1e Add support for stdcall without underscore
19: 99818fb = 19: 4288502 Customize site for MINGW
20: d4d17c6 = 20: a21a5e0 add python config sh
21: b02a288 = 21: 1fc50d3 mingw: prefer unix sep if MSYSTEM environment variable
22: 6808246 = 22: abe7ffe msys cygwin semi native build sysconfig
23: b3d9bfd = 23: 86b76c4 sysconfig: mingw sysconfig like posix
24: 8542c17 = 24: 3516d48 mingw use backslashes in compileall py
25: 9b7dae8 = 25: e9b726e mingw pdcurses_ISPAD
26: 536cde7 = 26: 99daa4f remove_path_max.default
27: 9c869ca = 27: 8d497f5 dont link with gettext
28: aba997f = 28: e86f1b1 ctypes python dll
29: f5ed373 = 29: 81085c6 gdbm module includes
30: 23c79da = 30: d288d8a use gnu_printf in format
31: e06ed2c = 31: 42b639d mingw fix ssl dont use enum_certificates
32: 1d9ca5a = 32: 891549c fix using dllhandle and winver mingw
33: 1924bc8 = 33: bbc1285 Add AMD64 to sys config so msvccompiler get_build_version works
34: c9a1892 = 34: 659cbbc MINGW link with additional library
35: 521aff8 = 35: eda63bd install msilib
36: 2308ea2 = 36: cc0bdc9 fix signal module build
37: 644f34f = 37: 5818156 build: build winconsoleio and _testconsole
38: 27ffef6 = 38: d502cca expose sem_unlink
39: 6cd3bd1 = 39: 5ead371 Use cygpty while using isatty
40: e1ffd84 = 40: ad4d0c0 build: link win resource files and build pythonw
41: 8edbbc4 = 41: e624dcf fix isselectable
42: 0dd043c = 42: 12fd7d4 configure.ac: fix inet_pton check
43: 40d231c = 43: df8bea1 pass gen profile ldflags
44: c2eac00 = 44: ca38f75 pkg config windows must link ext with python lib
45: f67d44b = 45: cda99ca importlib bootstrap path sep
46: b0cba8d = 46: 5a701dc warnings fixes
47: ddd3ad3 = 47: fb450a0 fix build testinternalcapi
48: 3d1055d = 48: 2acab44 clang arm64
49: dfd91a2 = 49: 8db9136 configure.ac: set MINGW stack reserve
50: add99fb = 50: 795c221 Don't use os.pathsep to find EOF not all distributions in win32 have them as \ instead check using sys.platform
51: 910b0b4 = 51: a53cb70 Fix extension suffix for c-extensions on mingw
52: b9aed95 = 52: d6637b2 Change the
get_platform()
method in sysconfig53: 3b1d6ad = 53: bec5eac build: Fix ncursesw include lookup
54: ab15791 = 54: 67683c9 tests: fix test_bytes
55: 7c60458 = 55: 3ff6825 time: fix strftime not raising for invalid year values
56: 5eec36e = 56: 98be673 ctypes: find_library('c') should return None with ucrt
57: 89a4b4d = 57: fe06944 build: Disable checks for dlopen/dlfcn
58: f86b7c5 = 58: 1d4b8e2 Fix install location of the import library
59: c0d98e0 = 59: f059cef build: Integrate venvlauncher build/installation into the Makefile
60: 8125064 = 60: 2915821 configure.ac: set WIN32_WINNT version
61: a12016d = 61: 3b6039f configure.ac: don't check for clock functions
62: b1a10ce = 62: 7ae0cde expanduser: normpath paths coming from env vars
63: 70ca8f9 ! 63: 47ce72d CI: test the build and add some mingw specific tests
64: 9a982e2 = 64: 976db1b Define PY3_DLLNAME to fix build
65: 6cba962 = 65: 3484fa8 _testconsole.c: Fix casing & path sep
66: 7695615 = 66: 9067eba Return consistent architecture markers for python on mingw/armv7
67: 985c125 = 67: 5ec71c6 handle ncursesw pkg-config when cross-compiling
68: 38ae702 = 68: c14bd24 mingw_smoketests: fix _UCRT condition
69: 6c9b0f6 = 69: 3d457a1 Modify
sys.winver
to match upstream70: 04658c6 = 70: c881e5c Change user site-packages path to include the environment info
71: 47e79d0 = 71: ae6e1d0 configure: Include a header in the check for _beginthread
72: e4d6e50 = 72: 6a26635 configure.ac: Default to --without-c-locale-coercion on Windows
73: 03f94f9 = 73: 74f220b Fix failing tests
74: 00643c7 = 74: 1428e3c Don't change os.sep with an empty MSYSTEM env var, not just a missing one
75: 36ca623 = 75: b22c819 def VPATH when compiling
Python/sysmodule.c
76: db32eb7 = 76: dc2b560 Make
_Py_CheckPython3
extern77: 8710424 = 77: b657721 link with bcrypt
78: 7c49805 = 78: c6434d6 correctly find native python
79: b338caa = 79: 4d6b893 Add extra flags for
_bootstrap_python
80: 5f4b245 = 80: 695c557 posixmodule: undefine
HAVE_OPENDIR
81: 1d57347 = 81: 1634abc getpath.py: add support for mingw
82: 53ba421 = 82: 0764cf8 Don't build _posixsubprocess on Windows.
83: 47ed1f2 = 83: 8a66a34
_ssl
: link withws2_32
84: dcfea6f = 84: 6c7977d Always normalize path in abspath
85: d74d486 = 85: eab7db8 Include
winsock.h
when checking for netdb function86: 62188f9 = 86: 2db91e3 include
_multiprocessing/semaphore.c
on win3287: 8e74139 = 87: 507a0d2 configure: build
mmap
module on win3288: b1e987b = 88: 4cdbd18 venv creation fixes
89: 5b165b3 = 89: 332bade move the
shutdown
function wherewinsock.h
is included90: c7abe01 = 90: bd21e70 configure.ac: set BUILDEXEEXT and EXEEXT
91: 7ababd4 = 91: 493e0cb configure.ac: fix building some test modules
92: cb2fb9b = 92: 3fe4778 Don't convert
sysconfig.get_config_var('VPATH')
to an absolute path93: cf42620 = 93: fd2fce5 Always convert
/
to\\
before passing though pathcch functions94: bbffaef = 94: 1af4d63 Build venvlauncher.exe from PC/launcher.c
95: 21ea4ff = 95: da39710 getpath.py: fix
dirname
96: dd92505 = 96: 212583e getpath: use normpath on all generated paths
97: 075b826 = 97: 81386f0 pathconfig: normpath sys.path[0]
98: 3a610bd = 98: 73466f5 smoketests: add some tests for sys/site paths
99: 18ab5d9 = 99: 3173106 Search DLLs only on paths added using
add_dll_directory()
.100: a075eec = 100: f0b9490 Build and install libpython3.dll
101: ff97b53 = 101: cb59019 Port GetPythonImport() to mingw
102: e9fc07f = 102: 43ec376 LoadLibraryExW: make sure to only use backslashes for paths
103: 8ece822 = 103: 7fb74c7 mingw_smoketests: add a test to check if sysconfig returns correct values for
LIBDIR
104: a7e81eb = 104: 304fe16 Add missing library for multiprocessing module
105: 0a88b1f = 105: 030038f selectmodule: add support for MINGW
106: a2d5460 = 106: dccfd40 readline: disable on MINGW
107: 61295ef = 107: b252937 Add libraries to fix compile of ctypes on MINGW
108: 0f19202 = 108: 1577a60 Add
-lpython<version>
while linking stdlib109: 72a2794 = 109: 46a6385 Enable
_uuid
on MINGW110: e4a488a = 110: 6eaf308 Enable curses library on MINGW
111: a0b5803 = 111: e72e44e mingw_smoketests: disable distutils related tests
112: 06cddcd = 112: 04c4231 configure.ac: use autoconf 2.69
113: c6f2e0a = 113: cd0b09b CI: clean up ignored tests
114: e3c5aa2 = 114: 25b10b4 gcc: make
incompatible-pointer-types
as warning115: bb73741 = 115: 38c3f19 test_makefile: normalize path
116: 9981748 = 116: 2e8dfb7
sysconfig.get_platform()
: use consistent naming117: 1f35c9e = 117: 238b8fb Add ucrt to version string
118: 1721cbd = 118: 50a4cea socketmodule: fix captilization of headers
119: 09c46b4 = 119: 4c0a7cc mingw_smoketests: build extension in a venv
120: a4f97eb = 120: 488889a venvlauncher: try looking for the versioned .exe first and then fall back
121: 0c2da1f < -: ----------- fixup! CI: test the build and add some mingw specific tests
-: ----------- > 121: 3f5d84a CI: update actions