Commit graph

1669 commits

Author SHA1 Message Date
Serhiy Storchaka
55e16b74fd
[3.13] gh-142282 Fix winreg.QueryValueEx() under race condition (GH-142283) (GH-142456)
(cherry picked from commit 3ec941b364)

Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
2025-12-09 16:46:24 +02:00
Miss Islington (bot)
dfbc5eb80e
[3.13] gh-140826: Update winreg's docstring (GH-141050) (GH-141200) (GH-141209)
(cherry picked from commit bea0d3d12b)
(cherry picked from commit b3377c3b41)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: AN Long <aisk@users.noreply.github.com>
2025-11-07 19:01:27 +00:00
Miss Islington (bot)
ac0ecb0f5d
[3.13] gh-140826 Remove the wrong documents about comparison behavior on winreg.HKEYType (GH-140999) (GH-141003)
(cherry picked from commit c3f9702f04)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2025-11-04 16:36:46 +00:00
Stan Ulbrych
0b302280af
[3.13] gh-71648: Optimize PNG files (GH-138842) (#138852)
* Only keep > 1 kb savings
(cherry picked from commit 2e8f64c931)
2025-09-14 08:29:59 -07:00
Miss Islington (bot)
0430135aac
gh-135455: Fix version and architecture detection in PC/layout script. (GH-135461)
(cherry picked from commit afc5ab6cce)

Co-authored-by: Steve Dower <steve.dower@python.org>
2025-06-13 15:28:02 +00:00
Steve Dower
b679b74132
[3.13] Backport PyManager support to PC/layout script (GH-135096) 2025-06-03 21:21:11 +01:00
Miss Islington (bot)
35eb3b82a6
GH-130727: Avoid race condition in _wmimodule by copying shared data (GH-134313)
(cherry picked from commit e4fbfb1288)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2025-05-20 21:44:17 +00:00
Steve Dower
ac99d7e5cc
gh-133512: Adds warnings to py.exe launcher about subcommands belonging to Python install manager (GH-133514) 2025-05-07 13:24:33 +01:00
Miss Islington (bot)
afd865aad6
gh-132649: Allow passing --include-tcltk to PC\layout on Windows ARM64 (GH-132650)
(cherry picked from commit b87189deae)

Co-authored-by: Steve Dower <steve.dower@python.org>
2025-04-17 19:37:30 +00:00
Miss Islington (bot)
5c0be8ced6
[3.13] gh-131712: Build _suggestions extension on Windows (GH-131759) (#131790)
gh-131712: Build _suggestions extension on Windows (GH-131759)

Add a test checking that the '_suggestions' extension is available.
(cherry picked from commit 9ef9d687ff)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-03-27 09:19:46 +00:00
Miss Islington (bot)
4d7d249a05
[3.13] gh-131327: Document winsound.SND_APPLICATION (GH-131328) (#131330)
gh-131327: Document winsound.SND_APPLICATION (GH-131328)
(cherry picked from commit bf4c1bf344)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-03-16 15:52:48 +00:00
Miss Islington (bot)
cf829f49de
[3.13] gh-131020: py.exe launcher does not correctly detect a BOM when searching for the shebang (GH-131021) (#131047)
gh-131020: py.exe launcher does not correctly detect a BOM when searching for the shebang (GH-131021)
(cherry picked from commit 36ef3bfe39)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2025-03-10 19:54:10 +00:00
Victor Stinner
bf6fa21a91
[3.13] gh-126433: Fix compiler warnings on 32-bit Windows (#126444) (#126827)
gh-126433: Fix compiler warnings on 32-bit Windows (#126444)

(cherry picked from commit 0b67ce930a)
2024-11-14 13:21:27 +01:00
Miss Islington (bot)
88e01318c2
gh-126074: Removes unnecessary DLLs from embeddable package (GH-126143)
(cherry picked from commit f51fd84034)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-11-05 21:08:44 +00:00
Miss Islington (bot)
9304416e7d
gh-125315: Avoid crashing in _wmimodule due to slow WMI calls on some Windows machines (GH-126141)
(cherry picked from commit 60c415bd53)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-10-30 20:26:14 +00:00
Miss Islington (bot)
06dc0bc6bf
gh-125550: Enable py.exe to detect Store installs of 3.14 (GH-125551)
(cherry picked from commit 8e7b2a1161)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-10-16 22:32:21 +00:00
Miss Islington (bot)
09aecb66df
[3.13] gh-124487: Update Windows API version to Windows 8.1 (GH-124676) (#124702)
gh-124487: Update Windows API version to Windows 8.1 (GH-124676)
(cherry picked from commit a4916e6013)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-09-27 19:59:26 +00:00
Miss Islington (bot)
447e07ab3d
[3.13] gh-119521: Rename IncompleteInputError to _IncompleteInputError and remove from public API/ABI (GH-119680, GH-120955) (GH-120944)
- gh-119521: Rename IncompleteInputError to _IncompleteInputError and remove from public API/ABI (GH-119680)
  (cherry picked from commit ce1064e4c9)

- gh-119521: Use `PyAPI_DATA`, not `extern`, for `_PyExc_IncompleteInputError` (GH-120955)
  (cherry picked from commit ac61d58db0)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-06-24 20:23:30 +02:00
Miss Islington (bot)
fbdff3803a
gh-119679: Fix layout of PYD and DLL files on Windows when using PC/layout script (GH-120133)
(cherry picked from commit cccc9f63c6)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-06-06 15:38:31 +00:00
Miss Islington (bot)
671b740f45
gh-119679: Ensures correct import libraries are included in Windows install packages (GH-119790)
(cherry picked from commit fd01271366)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-06-03 15:06:53 +00:00
Miss Islington (bot)
c3cfc04a73
gh-119070: Fix py.exe handling of /usr/bin/env commands missing extension (GH-119426)
(cherry picked from commit df93f5d4bf)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-05-29 20:06:38 +00:00
Miss Islington (bot)
44995aab49
gh-118876: Ensure PC/layout sets ns.temp before using it (GH-118880)
Fixes an AttributeError that occurs when checking if ns.temp is an absolute path during building from source on Windows.
(cherry picked from commit d8a82cca12)

Co-authored-by: I-Shen Leong <i-shenl@activestate.com>
2024-05-13 11:56:26 +00:00
Miss Islington (bot)
d524802e9d
Fix some missing null checks. (GH-118721)
(cherry picked from commit 7e6fcab200)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-05-10 10:01:00 +00:00
Brett Simmers
853163d3b5
gh-116322: Enable the GIL while loading C extension modules (#118560)
Add the ability to enable/disable the GIL at runtime, and use that in
the C module loading code.

We can't know before running a module init function if it supports
free-threading, so the GIL is temporarily enabled before doing so. If
the module declares support for running without the GIL, the GIL is
later disabled. Otherwise, the GIL is permanently enabled, and will
never be disabled again for the life of the current interpreter.
2024-05-06 23:07:23 -04:00
Tian Gao
b034f14a4b
gh-74929: Implement PEP 667 (GH-115153) 2024-05-04 12:12:10 +01:00
Brett Simmers
c2627d6eea
gh-116322: Add Py_mod_gil module slot (#116882)
This PR adds the ability to enable the GIL if it was disabled at
interpreter startup, and modifies the multi-phase module initialization
path to enable the GIL when loading a module, unless that module's spec
includes a slot indicating it can run safely without the GIL.

PEP 703 called the constant for the slot `Py_mod_gil_not_used`; I went
with `Py_MOD_GIL_NOT_USED` for consistency with gh-104148.

A warning will be issued up to once per interpreter for the first
GIL-using module that is loaded. If `-v` is given, a shorter message
will be printed to stderr every time a GIL-using module is loaded
(including the first one that issues a warning).
2024-05-03 11:30:55 -04:00
Steve Dower
4b10e209c7
gh-117786: Fix venv created from Windows Store install by restoring __PYVENV_LAUNCHER__ smuggling (GH-117814) 2024-04-24 23:00:55 +01:00
Eric Snow
03e3e31723
gh-76785: Rename _xxsubinterpreters to _interpreters (gh-117791)
See https://discuss.python.org/t/pep-734-multiple-interpreters-in-the-stdlib/41147/26.
2024-04-24 16:18:24 +00:00
Steve Dower
7d9d6b53bc
gh-112278: Improve error handling in wmi module and tests (GH-117818) 2024-04-15 15:43:11 +01:00
Victor Stinner
507896d97d
gh-116936: Add PyType_GetModuleByDef() to the limited C API (#116937) 2024-03-25 16:32:20 +00:00
Serhiy Storchaka
e2e0b4b4b9
gh-113024: C API: Add PyObject_GenericHash() function (GH-113025) 2024-03-22 20:19:10 +02:00
Steve Dower
3be9b9d872
Fix get_packagefamilyname helper function on Windows 32-bit (GH-117153) 2024-03-22 15:00:50 +00:00
Victor Stinner
abdd1f938f
gh-85283: Build _testconsole extension with limited C API (#117125) 2024-03-21 17:45:43 +01:00
Victor Stinner
8bea6c411d
gh-115754: Add Py_GetConstant() function (#116883)
Add Py_GetConstant() and Py_GetConstantBorrowed() functions.

In the limited C API version 3.13, getting Py_None, Py_False,
Py_True, Py_Ellipsis and Py_NotImplemented singletons is now
implemented as function calls at the stable ABI level to hide
implementation details. Getting these constants still return borrowed
references.

Add _testlimitedcapi/object.c and test_capi/test_object.py to test
Py_GetConstant() and Py_GetConstantBorrowed() functions.
2024-03-21 16:07:00 +00:00
Victor Stinner
c432df6d56
gh-111696, PEP 737: Add PyType_GetModuleName() function (#116824)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2024-03-14 18:17:43 +00:00
Victor Stinner
19c3a2ff91
gh-111696, PEP 737: Add PyType_GetFullyQualifiedName() function (#116815)
Rewrite tests on type names in Python, they were written in C.
2024-03-14 16:19:36 +00:00
Victor Stinner
2b67fc57f6
gh-108494: Fix Argument Clinic LIMITED_CAPI_REGEX (#116610)
Accept spaces in "#  define Py_LIMITED_API 0x030d0000".
2024-03-11 22:42:18 +00:00
Steve Dower
37a13b9413
gh-115582: Make default PC/pyconfig.h work for free-threaded builds with manual /DPy_GIL_DISABLED (GH-115850) 2024-02-26 19:14:14 +00:00
Steve Dower
6cd18c75a4
gh-115543: Update py.exe to know about Python 3.13 and to install 3.12 by default (GH-115544) 2024-02-19 20:36:20 +00:00
Steve Dower
ea25f32d5f
gh-89240: Enable multiprocessing on Windows to use large process pools (GH-107873)
We add _winapi.BatchedWaitForMultipleObjects to wait for larger numbers of handles.
This is an internal module, hence undocumented, and should be used with caution.
Check the docstring for info before using BatchedWaitForMultipleObjects.
2024-02-13 00:28:35 +00:00
Steve Dower
c39272e143
gh-115049: Fix py.exe failing when user has no LocalAppData. (GH-115185)
Also ensure we always display a debug message or error for RC_INTERNAL_ERROR
2024-02-12 17:05:38 +00:00
Sam Gross
d0f1307580
gh-114329: Add PyList_GetItemRef function (GH-114504)
The new `PyList_GetItemRef` is similar to `PyList_GetItem`, but returns
a strong reference instead of a borrowed reference. Additionally, if the
passed "list" object is not a list, the function sets a `TypeError`
instead of calling `PyErr_BadInternalCall()`.
2024-02-02 14:03:15 +01:00
Pablo Galindo Salgado
39d102c2ee
gh-113744: Add a new IncompleteInputError exception to improve incomplete input detection in the codeop module (#113745)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2024-01-30 16:21:30 +00:00
Vincent Cunningham
d5c21c12c1
gh-100107: Make py.exe launcher ignore app aliases that launch Microsoft Store (GH-114358) 2024-01-25 00:23:28 +00:00
Steve Dower
f56d132deb
gh-112984 Update Windows build and installer for free-threaded builds (GH-113129) 2024-01-17 21:52:23 +00:00
solya0x
c86571e4c9
Update copyright years to 2024. (GH-113608)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-16 21:54:05 +01:00
Zackery Spytz
b4d4aa9e8d
gh-81489: Use Unicode APIs for mmap tagname on Windows (GH-14133)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-01-11 22:39:47 +00:00
Steve Dower
79dad03747
gh-111650: Ensure pyconfig.h includes Py_GIL_DISABLED on Windows (GH-112778) 2023-12-13 15:38:45 +00:00
Eric Snow
a49b427b02
gh-76785: More Fixes for test.support.interpreters (gh-113012)
This brings the module (along with the associated extension modules) mostly in sync with PEP 734.  There are only a few small things to wrap up.
2023-12-12 17:43:30 +00:00
AN Long
5a0137ca34
gh-112278: In _wmi, treat initialization timeout separately from connection timeout (GH-112878) 2023-12-08 16:52:22 +00:00