summaryrefslogtreecommitdiffstats
path: root/PC
Commit message (Collapse)AuthorAgeFilesLines
* gh-119679: Ensures correct import libraries are included in Windows install ↵Miss Islington (bot)2024-06-031-6/+8
| | | | | | | packages (GH-119790) (cherry picked from commit fd01271366abefa8f991e53f090387882fbd6bdd) Co-authored-by: Steve Dower <steve.dower@python.org>
* gh-119070: Fix py.exe handling of /usr/bin/env commands missing extension ↵Miss Islington (bot)2024-05-291-1/+1
| | | | | | | (GH-119426) (cherry picked from commit df93f5d4bf9d70036d485666d4dd4f009d37f8b9) Co-authored-by: Steve Dower <steve.dower@python.org>
* gh-118876: Ensure PC/layout sets ns.temp before using it (GH-118880)Miss Islington (bot)2024-05-131-10/+9
| | | | | | Fixes an AttributeError that occurs when checking if ns.temp is an absolute path during building from source on Windows. (cherry picked from commit d8a82cca12e12a6b22bfe6691e9b222f6d276f0a) Co-authored-by: I-Shen Leong <i-shenl@activestate.com>
* Fix some missing null checks. (GH-118721)Miss Islington (bot)2024-05-101-0/+5
| | | | | (cherry picked from commit 7e6fcab20003b07621dc02ea78d6ea2fda500371) Co-authored-by: Steve Dower <steve.dower@python.org>
* gh-116322: Enable the GIL while loading C extension modules (#118560)Brett Simmers2024-05-071-3/+9
| | | | | | | | | | 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.
* gh-74929: Implement PEP 667 (GH-115153)Tian Gao2024-05-041-0/+3
|
* gh-116322: Add Py_mod_gil module slot (#116882)Brett Simmers2024-05-034-4/+8
| | | | | | | | | | | | | | 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).
* gh-117786: Fix venv created from Windows Store install by restoring ↵Steve Dower2024-04-241-2/+2
| | | | __PYVENV_LAUNCHER__ smuggling (GH-117814)
* gh-76785: Rename _xxsubinterpreters to _interpreters (gh-117791)Eric Snow2024-04-241-6/+6
| | | See https://discuss.python.org/t/pep-734-multiple-interpreters-in-the-stdlib/41147/26.
* gh-112278: Improve error handling in wmi module and tests (GH-117818)Steve Dower2024-04-151-19/+26
|
* gh-116936: Add PyType_GetModuleByDef() to the limited C API (#116937)Victor Stinner2024-03-251-0/+1
|
* gh-113024: C API: Add PyObject_GenericHash() function (GH-113025)Serhiy Storchaka2024-03-221-1/+1
|
* Fix get_packagefamilyname helper function on Windows 32-bit (GH-117153)Steve Dower2024-03-221-1/+1
|
* gh-85283: Build _testconsole extension with limited C API (#117125)Victor Stinner2024-03-212-95/+39
|
* gh-115754: Add Py_GetConstant() function (#116883)Victor Stinner2024-03-211-0/+2
| | | | | | | | | | | | 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.
* gh-111696, PEP 737: Add PyType_GetModuleName() function (#116824)Victor Stinner2024-03-141-0/+1
| | | Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* gh-111696, PEP 737: Add PyType_GetFullyQualifiedName() function (#116815)Victor Stinner2024-03-141-0/+1
| | | Rewrite tests on type names in Python, they were written in C.
* gh-108494: Fix Argument Clinic LIMITED_CAPI_REGEX (#116610)Victor Stinner2024-03-111-3/+2
| | | Accept spaces in "# define Py_LIMITED_API 0x030d0000".
* gh-115582: Make default PC/pyconfig.h work for free-threaded builds with ↵Steve Dower2024-02-261-1/+6
| | | | manual /DPy_GIL_DISABLED (GH-115850)
* gh-115543: Update py.exe to know about Python 3.13 and to install 3.12 by ↵Steve Dower2024-02-191-1/+4
| | | | default (GH-115544)
* gh-89240: Enable multiprocessing on Windows to use large process pools ↵Steve Dower2024-02-131-0/+3
| | | | | | | (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.
* gh-115049: Fix py.exe failing when user has no LocalAppData. (GH-115185)Steve Dower2024-02-121-2/+13
| | | Also ensure we always display a debug message or error for RC_INTERNAL_ERROR
* gh-114329: Add `PyList_GetItemRef` function (GH-114504)Sam Gross2024-02-021-0/+1
| | | | | | | 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()`.
* gh-113744: Add a new IncompleteInputError exception to improve incomplete ↵Pablo Galindo Salgado2024-01-301-0/+1
| | | | | input detection in the codeop module (#113745) Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
* gh-100107: Make py.exe launcher ignore app aliases that launch Microsoft ↵Vincent Cunningham2024-01-251-0/+69
| | | | Store (GH-114358)
* gh-112984 Update Windows build and installer for free-threaded builds ↵Steve Dower2024-01-176-31/+639
| | | | (GH-113129)
* Update copyright years to 2024. (GH-113608)solya0x2024-01-161-1/+1
| | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-81489: Use Unicode APIs for mmap tagname on Windows (GH-14133)Zackery Spytz2024-01-111-2/+0
| | | Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-111650: Ensure pyconfig.h includes Py_GIL_DISABLED on Windows (GH-112778)Steve Dower2023-12-133-3/+10
|
* gh-76785: More Fixes for test.support.interpreters (gh-113012)Eric Snow2023-12-121-0/+2
| | | 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.
* gh-112278: In _wmi, treat initialization timeout separately from connection ↵AN Long2023-12-081-12/+34
| | | | timeout (GH-112878)
* gh-112278: Disable WMI queries on Windows after they time out (GH-112658)AN Long2023-12-071-2/+23
|
* Fix typos in variable names, function names, and comments (GH-101868)Yang Hau2023-12-011-1/+1
|
* gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864)Hugo van Kemenade2023-11-201-1/+1
| | | Rename Py_NOGIL to Py_GIL_DISABLED
* gh-111089: Revert PyUnicode_AsUTF8() changes (#111833)Victor Stinner2023-11-071-1/+0
| | | | | | | | | | | | | | | | | | | | | * Revert "gh-111089: Use PyUnicode_AsUTF8() in Argument Clinic (#111585)" This reverts commit d9b606b3d04fc56fb0bcc479d7d6c14562edb5e2. * Revert "gh-111089: Use PyUnicode_AsUTF8() in getargs.c (#111620)" This reverts commit cde1071b2a72e8261ca66053ef61431b7f3a81fd. * Revert "gh-111089: PyUnicode_AsUTF8() now raises on embedded NUL (#111091)" This reverts commit d731579bfb9a497cfb0076cb6b221058a20088fe. * Revert "gh-111089: Add PyUnicode_AsUTF8() to the limited C API (#111121)" This reverts commit d8f32be5b6a736dc2fc9dca3f1bf176c82fc9b44. * Revert "gh-111089: Use PyUnicode_AsUTF8() in sqlite3 (#111122)" This reverts commit 37e4e20eaa8f27ada926d49e5971fecf0477ad26.
* gh-111506: Implement Py_SET_REFCNT() as opaque function in limited C API ↵Victor Stinner2023-11-031-0/+1
| | | | | | | | (#111508) In the limited C API version 3.13, Py_SET_REFCNT() function is now implemented as an opaque function call. Add _Py_SetRefcnt() to the stable ABI.
* gh-110968: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED was added to 3.12 (#111584)Victor Stinner2023-11-011-2/+2
|
* gh-90815: Exclude mimalloc .c files from Windows build (#111532)Dino Viehland2023-10-311-0/+3
| | | | * Don't include mimalloc .c's in Windows build * Fix warnings on Windows related to mimalloc
* gh-110481: Implement biased reference counting (gh-110764)Sam Gross2023-10-301-0/+2
|
* gh-111089: Add PyUnicode_AsUTF8() to the limited C API (#111121)Victor Stinner2023-10-201-0/+1
| | | | | | | | Add PyUnicode_AsUTF8() function to the limited C API. multiprocessing posixshmem now uses PyUnicode_AsUTF8() instead of PyUnicode_AsUTF8AndSize(): the extension is built with the limited C API. The function now raises an exception if the filename contains an embedded null character instead of truncating silently the filename.
* gh-85283: Add PySys_Audit() to the limited C API (#108571)Victor Stinner2023-10-171-0/+2
| | | | | | | | | | The PySys_Audit() function was added in Python 3.8 by the PEP 578 "Python Runtime Audit Hooks". Add also PySys_AuditTuple() to the limited C API, function added to Python 3.13. Move non-limited "PerfMap" C API from Include/sysmodule.h to Include/cpython/sysmodule.h.
* gh-85283: Build winsound extension with limited C API (#110978)Victor Stinner2023-10-172-129/+25
| | | Replace type->tp_name with PyType_GetQualName().
* gh-110964: Remove private _PyArg functions (#110966)Victor Stinner2023-10-177-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the following private functions and structures to pycore_modsupport.h internal C API: * _PyArg_BadArgument() * _PyArg_CheckPositional() * _PyArg_NoKeywords() * _PyArg_NoPositional() * _PyArg_ParseStack() * _PyArg_ParseStackAndKeywords() * _PyArg_Parser structure * _PyArg_UnpackKeywords() * _PyArg_UnpackKeywordsWithVararg() * _PyArg_UnpackStack() * _Py_ANY_VARARGS() Changes: * Python/getargs.h now includes pycore_modsupport.h to export functions. * clinic.py now adds pycore_modsupport.h when one of these functions is used. * Add pycore_modsupport.h includes when a C extension uses one of these functions. * Define Py_BUILD_CORE_MODULE in C extensions which now include directly or indirectly (via code generated by Argument Clinic) pycore_modsupport.h: * _csv * _curses_panel * _dbm * _gdbm * _multiprocessing.posixshmem * _sqlite.row * _statistics * grp * resource * syslog * _testcapi: bad_get() no longer uses METH_FASTCALL calling convention but METH_VARARGS. Replace _PyArg_UnpackStack() with PyArg_ParseTuple(). * _testcapi: add PYTESTCAPI_NEED_INTERNAL_API macro which is defined by _testcapi sub-modules which need the internal C API (pycore_modsupport.h): exceptions.c, float.c, vectorcall.c, watchers.c. * Remove Include/cpython/modsupport.h header file. Include/modsupport.h no longer includes the removed header file. * Fix mypy clinic.py
* gh-85283: Add PyMem_RawMalloc() to the limited C API (#108570)Victor Stinner2023-10-171-0/+4
| | | | | | | | | Add PyMem_RawMalloc(), PyMem_RawCalloc(), PyMem_RawRealloc() and PyMem_RawFree() to the limited C API. These functions were added by Python 3.4 and are needed to port stdlib extensions to the limited C API, like grp and pwd. Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-110289: C API: Add PyUnicode_EqualToUTF8() and ↵Serhiy Storchaka2023-10-111-0/+2
| | | | PyUnicode_EqualToUTF8AndSize() functions (GH-110297)
* gh-110397: Add Py_IsFinalizing() to the stable ABI (#110441)Victor Stinner2023-10-071-0/+1
|
* gh-110147: test_msvcrt: run console I/O tests in new processes (#110268)AN Long2023-10-052-88/+1
|
* gh-88402: Add new sysconfig variables on Windows (GH-110049)Sam Gross2023-10-041-0/+2
| | | | Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
* gh-110014: Remove PY_TIMEOUT_MAX from limited C API (#110217)Victor Stinner2023-10-021-1/+0
| | | | | | | | If the timeout is greater than PY_TIMEOUT_MAX, PyThread_acquire_lock_timed() uses a timeout of PY_TIMEOUT_MAX microseconds, which is around 280.6 years. This case is unlikely and limiting a timeout to 280.6 years sounds like a reasonable trade-off. The constant PY_TIMEOUT_MAX is not used in PyPI top 5,000 projects.
* gh-83180: Made launcher treat shebang 'python' tags as low priority so that ↵Steve Dower2023-10-021-6/+32
| | | | active virtual environments are preferred (GH-108101)