Commit Graph

1671 Commits

Author SHA1 Message Date
Hugo van Kemenade
91f4908798
gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
Serhiy Storchaka
061e50f196
gh-122943: Add the varpos parameter in _PyArg_UnpackKeywords (GH-126564)
Remove _PyArg_UnpackKeywordsWithVararg.
Add comments for integer arguments of _PyArg_UnpackKeywords.
2024-11-08 14:23:50 +02:00
Steve Dower
f51fd84034
gh-126074: Removes unnecessary DLLs from embeddable package (GH-126143) 2024-11-05 20:43:52 +00:00
Victor Stinner
0b67ce930a
gh-126433: Fix compiler warnings on 32-bit Windows (#126444) 2024-11-05 16:05:13 +01:00
Steve Dower
60c415bd53
gh-125315: Avoid crashing in _wmimodule due to slow WMI calls on some Windows machines (GH-126141) 2024-10-30 19:59:51 +00:00
Victor Stinner
db96327203
gh-121654: Add PyType_Freeze() function (#122457)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-10-25 11:12:48 +02:00
Steve Dower
8e7b2a1161
gh-125550: Enable py.exe to detect Store installs of 3.14 (GH-125551) 2024-10-16 23:05:20 +01:00
Victor Stinner
a7f0727ca5
gh-124502: Add PyUnicode_Equal() function (#124504) 2024-10-07 21:24:53 +00:00
Steve Dower
fac5e7aa17
gh-124487: Require at least Windows 10 SDK and update install check (GH-124672) 2024-09-30 18:50:46 +01:00
Victor Stinner
9d344fafc4
gh-124127: Make Py_REFCNT() opaque in limited C API 3.14 (#124128) 2024-09-24 08:42:58 +02:00
Donghee Na
ad7c778546
gh-123990: Good bye WITH_FREELISTS macro (gh-124358) 2024-09-24 01:28:59 +00:00
neonene
646f16bdee
gh-124153: Implement PyType_GetBaseByToken() and Py_tp_token slot (GH-124163) 2024-09-18 09:18:19 +02:00
Victor Stinner
4c6dca8292
gh-120389: Add PyLong_FromInt64() and PyLong_AsInt64() (#120390)
Add new functions to convert C <stdint.h> numbers from/to Python int:

* PyLong_FromInt32()
* PyLong_FromUInt32()
* PyLong_FromInt64()
* PyLong_FromUInt64()
* PyLong_AsInt32()
* PyLong_AsUInt32()
* PyLong_AsInt64()
* PyLong_AsUInt64()
2024-08-28 10:16:13 +00:00
Erlend E. Aasland
e006c7371d
gh-105201: Add PyIter_NextItem() (#122331)
Return -1 and set an exception on error; return 0 if the iterator is
exhausted, and return 1 if the next item was fetched successfully.

Prefer this API to PyIter_Next(), which requires the caller to use
PyErr_Occurred() to differentiate between iterator exhaustion and errors.

Co-authered-by: Irit Katriel <iritkatriel@yahoo.com>
2024-08-08 00:47:15 +02:00
Pablo Galindo Salgado
ac61d58db0
gh-119521: Rename IncompleteInputError to _IncompleteInputError and remove from public API/ABI (GH-119680)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-06-24 14:08:12 +02:00
Victor Stinner
16f8e22e7c
gh-120600: Make Py_TYPE() opaque in limited C API 3.14 (#120601)
In the limited C API 3.14 and newer, Py_TYPE() is now implemented as
an opaque function call to hide implementation details.
2024-06-18 14:28:48 +00:00
Victor Stinner
d9b4316374
gh-120417: Remove unused imports in Tools (#120623) 2024-06-17 18:09:26 +02:00
Steve Dower
cccc9f63c6
gh-119679: Fix layout of PYD and DLL files on Windows when using PC/layout script (GH-120133) 2024-06-06 16:11:42 +01:00
Steve Dower
fd01271366
gh-119679: Ensures correct import libraries are included in Windows install packages (GH-119790) 2024-06-03 15:42:45 +01:00
Steve Dower
df93f5d4bf
gh-119070: Fix py.exe handling of /usr/bin/env commands missing extension (GH-119426) 2024-05-29 18:51:13 +01:00
Serhiy Storchaka
b313cc68d5
gh-117557: Improve error messages when a string, bytes or bytearray of length 1 are expected (GH-117631) 2024-05-28 12:01:37 +03:00
Jelle Zijlstra
84be5244de
gh-119180: Update the magic number (#119397)
PR #119321 added a comment about the magic number bump
but did not actually apply the new magic number.
2024-05-24 17:32:17 -07:00
I-Shen Leong
d8a82cca12
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.
2024-05-13 12:30:16 +01:00
Steve Dower
7e6fcab200
Fix some missing null checks. (GH-118721) 2024-05-10 10:31:55 +01:00
Kirill Podoprigora
ed2b0fb044
Update Windows library names for the Python version bump (#118766) 2024-05-08 16:00:38 +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