summaryrefslogtreecommitdiffstats
path: root/PC
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* gh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage (#110139)Victor Stinner2023-09-301-0/+1
| | | | | | | | | | | | | | | | * pycore_pythread.h is now the central place to make sure that _POSIX_THREADS and _POSIX_SEMAPHORES macros are defined if available. * Make sure that pycore_pythread.h is included when _POSIX_THREADS and _POSIX_SEMAPHORES macros are tested. * PY_TIMEOUT_MAX is now defined as a constant, since its value depends on _POSIX_THREADS, instead of being defined as a macro. * Prevent integer overflow in the preprocessor when computing PY_TIMEOUT_MAX_VALUE on Windows: replace "0xFFFFFFFELL * 1000 < LLONG_MAX" with "0xFFFFFFFELL < LLONG_MAX / 1000". * Document the change and give hints how to fix affected code. * Add an exception for PY_TIMEOUT_MAX name to smelly.py * Add PY_TIMEOUT_MAX to the stable ABI
* gh-108996: fix and enable test_msvcrt (#109226)AN Long2023-09-222-1/+106
| | | | | | * Add _testconsole.flush_console_input_buffer() function. * test_kbhit(), test_getwch() and test_getwche() now call flush_console_input_buffer(). * Don't override sys.stdin anymore (not needed).
* gh-74481: Add missing debug function docs and constants to msvcrt (GH-109650)AN Long2023-09-211-0/+4
|
* gh-108511: Add C API functions which do not silently ignore errors (GH-109025)Serhiy Storchaka2023-09-171-0/+4
| | | | | | | | | Add the following functions: * PyObject_HasAttrWithError() * PyObject_HasAttrStringWithError() * PyMapping_HasKeyWithError() * PyMapping_HasKeyStringWithError()
* gh-109266: Fix msvcrt.kbhit's documented return value (GH-109267)AN Long2023-09-122-4/+4
|
* gh-108494: Argument Clinic: inline parsing code for positional-only ↵Serhiy Storchaka2023-09-032-12/+15
| | | | parameters in the limited C API (GH-108622)
* gh-107603: Argument Clinic: Only include pycore_gc.h if needed (#108726)Victor Stinner2023-08-315-24/+14
| | | | | | | | | | | | | | | | | | | | Argument Clinic now only includes pycore_gc.h if PyGC_Head is needed, and only includes pycore_runtime.h if _Py_ID() is needed. * Add 'condition' optional argument to Clinic.add_include(). * deprecate_keyword_use() includes pycore_runtime.h when using the _PyID() function. * Fix rendering of includes: comments start at the column 35. * Mark PC/clinic/_wmimodule.cpp.h and "Objects/stringlib/clinic/*.h.h" header files as generated in .gitattributes. Effects: * 42 header files generated by AC no longer include the internal C API, instead of 4 header files before. For example, Modules/clinic/_abc.c.h no longer includes the internal C API. * Fix _testclinic_depr.c.h: it now always includes pycore_runtime.h to get _Py_ID().
* gh-108635: Make parameters of some implementations of special methods ↵Serhiy Storchaka2023-08-292-33/+8
| | | | positional-only (GH-108636)
* gh-108494: Argument Clinic: fix support of Limited C API (GH-108536)Serhiy Storchaka2023-08-281-1/+2
|
* gh-106320: Remove private _PyLong converter functions (#108499)Victor Stinner2023-08-261-1/+2
| | | | | | | | | | | Move these private functions to the internal C API (pycore_long.h): * _PyLong_UnsignedInt_Converter() * _PyLong_UnsignedLongLong_Converter() * _PyLong_UnsignedLong_Converter() * _PyLong_UnsignedShort_Converter() Argument Clinic now emits #include "pycore_long.h" when these functions are used.
* gh-108444: Argument Clinic uses PyLong_AsInt() (#108458)Victor Stinner2023-08-243-27/+27
| | | | Argument Clinic now uses the new public PyLong_AsInt(), rather than the old name _PyLong_AsInt().
* gh-108444: Add PyLong_AsInt() public function (#108445)Victor Stinner2023-08-241-0/+1
| | | | | | * Rename _PyLong_AsInt() to PyLong_AsInt(). * Add documentation. * Add test. * For now, keep _PyLong_AsInt() as an alias to PyLong_AsInt().
* gh-106869: Use new PyMemberDef constant names (#106871)Victor Stinner2023-07-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove '#include "structmember.h"'. * If needed, add <stddef.h> to get offsetof() function. * Update Parser/asdl_c.py to regenerate Python/Python-ast.c. * Replace: * T_SHORT => Py_T_SHORT * T_INT => Py_T_INT * T_LONG => Py_T_LONG * T_FLOAT => Py_T_FLOAT * T_DOUBLE => Py_T_DOUBLE * T_STRING => Py_T_STRING * T_OBJECT => _Py_T_OBJECT * T_CHAR => Py_T_CHAR * T_BYTE => Py_T_BYTE * T_UBYTE => Py_T_UBYTE * T_USHORT => Py_T_USHORT * T_UINT => Py_T_UINT * T_ULONG => Py_T_ULONG * T_STRING_INPLACE => Py_T_STRING_INPLACE * T_BOOL => Py_T_BOOL * T_OBJECT_EX => Py_T_OBJECT_EX * T_LONGLONG => Py_T_LONGLONG * T_ULONGLONG => Py_T_ULONGLONG * T_PYSSIZET => Py_T_PYSSIZET * T_NONE => _Py_T_NONE * READONLY => Py_READONLY * PY_AUDIT_READ => Py_AUDIT_READ * READ_RESTRICTED => Py_AUDIT_READ * PY_WRITE_RESTRICTED => _Py_WRITE_RESTRICTED * RESTRICTED => (READ_RESTRICTED | _Py_WRITE_RESTRICTED)
* gh-106004: Add PyDict_GetItemRef() function (#106005)Victor Stinner2023-07-211-0/+2
| | | | | * Add PyDict_GetItemRef() and PyDict_GetItemStringRef() functions. Add these functions to the stable ABI version 3.13. * Add unit tests on the PyDict C API in test_capi.
* gh-86493: Use PyModule_Add() instead of PyModule_AddObjectRef() (GH-106860)Serhiy Storchaka2023-07-182-22/+5
|
* bpo-42327: C API: Add PyModule_Add() function (GH-23443)Serhiy Storchaka2023-07-181-0/+1
| | | | | It is a fixed implementation of PyModule_AddObject() which consistently steals reference both on success and on failure.
* gh-106307: C API: Add PyMapping_GetOptionalItem() function (GH-106308)Serhiy Storchaka2023-07-111-0/+2
| | | | Also add PyMapping_GetOptionalItemString() function.
* gh-106521: Add PyObject_GetOptionalAttr() function (GH-106522)Serhiy Storchaka2023-07-111-0/+2
| | | | | | It is a new name of former _PyObject_LookupAttr(). Add also PyObject_GetOptionalAttrString().
* gh-106572: Convert PyObject_DelAttr() to a function (#106611)Victor Stinner2023-07-111-0/+2
| | | | | | | | * Convert PyObject_DelAttr() and PyObject_DelAttrString() macros to functions. * Add PyObject_DelAttr() and PyObject_DelAttrString() functions to the stable ABI. * Replace PyObject_SetAttr(obj, name, NULL) with PyObject_DelAttr(obj, name).
* gh-104922: remove PY_SSIZE_T_CLEAN (#106315)Inada Naoki2023-07-021-1/+0
|
* gh-105775: Convert LOAD_CLOSURE to a pseudo-op (#106059)hms2023-06-291-0/+1
| | | | | | This enables super-instruction formation, removal of checks for uninitialized variables, and frees up an instruction.
* gh-105927: Add PyWeakref_GetRef() function (#105932)Victor Stinner2023-06-211-0/+1
| | | | Add tests on PyWeakref_NewRef(), PyWeakref_GetObject(), PyWeakref_GET_OBJECT() and PyWeakref_GetRef().
* gh-105922: Add PyImport_AddModuleRef() function (#105923)Victor Stinner2023-06-201-0/+1
| | | | | | * Add tests on PyImport_AddModuleRef(), PyImport_AddModule() and PyImport_AddModuleObject(). * pythonrun.c: Replace Py_XNewRef(PyImport_AddModule(name)) with PyImport_AddModuleRef(name).
* gh-102304: Fix Py_INCREF() stable ABI in debug mode (#104763)Victor Stinner2023-06-061-2/+0
| | | | | | | | | | | When Python is built in debug mode (if the Py_REF_DEBUG macro is defined), the Py_INCREF() and Py_DECREF() function are now always implemented as opaque functions to avoid leaking implementation details like the "_Py_RefTotal" variable or the _Py_DecRefTotal_DO_NOT_USE_THIS() function. * Remove _Py_IncRefTotal_DO_NOT_USE_THIS() and _Py_DecRefTotal_DO_NOT_USE_THIS() from the stable ABI. * Remove _Py_NegativeRefcount() from limited C API.
* gh-102304: doc: Add links to Stable ABI and Limited C API (#105345)Victor Stinner2023-06-061-1/+0
| | | | | | | | | * Add "limited-c-api" and "stable-api" references. * Rename "stable-abi-list" reference to "limited-api-list". * Makefile: Document files regenerated by "make regen-limited-abi" * Remove first empty line in generated files: - Lib/test/test_stable_abi_ctypes.py - PC/python3dll.c
* gh-92536: Argument Clinic no longer emits PyUnicode_READY() (#105208)Victor Stinner2023-06-013-15/+3
| | | | | | Since Python 3.12, PyUnicode_READY() does nothing and always returns 0. Argument Clinic now also checks for .cpp files (PC/_wmimodule.cpp).
* gh-105156: Argument Clinic avoids Py_UNICODE type (#105161)Victor Stinner2023-05-312-80/+72
| | | | Argument Clinic now uses "const wchar_t*" type instead of "const Py_UNICODE*" type for the "Py_UNICODE" format.
* gh-102304: Fix 2 New Stable ABI Functions (gh-104762)Eric Snow2023-05-301-0/+2
|
* gh-103646: Remove --include-pip-user from default APPX package build (GH-105064)Steve Dower2023-05-291-1/+0
|
* gh-104773: PEP 594: Remove the audioop module (#104937)Victor Stinner2023-05-251-2/+0
|
* gh-104773: Remove the msilib package (GH-104911)Zachary Ware2023-05-252-2010/+0
|
* gh-104773: PEP 594: Remove the nis module (#104897)Victor Stinner2023-05-241-3/+0
|
* gh-104780: Remove 2to3 program and lib2to3 module (#104781)Victor Stinner2023-05-233-27/+0
| | | | | | | | | * Remove the Tools/scripts/2to3 script. * Remove the Lib/test/test_lib2to3/ directory. * Doc/tools/extensions/pyspecific.py: remove the "2to3fixer" object type. * Makefile and PC/layout/main.py no longer compile lib2to3 grammar files. * Update Makefile for 2to3 removal.
* Update Windows library names for the Python version bump (#104755)Kirill Podoprigora2023-05-221-2/+2
|
* gh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-104205)Eric Snow2023-05-054-0/+4
| | | Here we are doing no more than adding the value for Py_mod_multiple_interpreters and using it for stdlib modules. We will start checking for it in gh-104206 (once PyInterpreterState.ceval.own_gil is added in gh-104204).
* gh-103509: PEP 697 -- Limited C API for Extending Opaque Types (GH-103511)Petr Viktorin2023-05-042-0/+4
| | | | Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-83004: Harden msvcrt further (#103420)Erlend E. Aasland2023-04-191-62/+53
|
* gh-95299: Remove lingering setuptools reference in installer scripts (GH-103613)Steve Dower2023-04-181-1/+0
|
* gh-103092: Isolate winreg (#103250)AN Long2023-04-172-144/+181
|
* gh-103092: Isolate msvcrt (#103248)AN Long2023-04-121-28/+25
|
* gh-103092: Isolate winsound (#103249)AN Long2023-04-101-25/+22
|
* gh-83004: Harden winreg init (#103386)Erlend E. Aasland2023-04-101-28/+37
|
* gh-83004: Harden `msvcrt` init (#103383)Erlend E. Aasland2023-04-101-12/+29
|
* gh-83004: Harden winsound init (#103385)Erlend E. Aasland2023-04-091-16/+14
|
* gh-103167: Fix `-Wstrict-prototypes` warnings by using `(void)` for ↵Nikita Sobolev2023-04-052-9/+9
| | | | functions with no args (GH-103168)
* gh-102755: Add PyErr_DisplayException(exc) (#102756)Irit Katriel2023-03-161-0/+1
|
* gh-102255: Improve build support for Windows API partitions (GH-102256)Max Bachmann2023-03-097-5/+340
| | | | | Add `MS_WINDOWS_DESKTOP`, `MS_WINDOWS_APPS`, `MS_WINDOWS_SYSTEM` and `MS_WINDOWS_GAMES` preprocessor definitions to allow switching off functionality missing from particular API partitions ("partitions" are used in Windows to identify overlapping subsets of APIs). CPython only officially supports `MS_WINDOWS_DESKTOP` and `MS_WINDOWS_SYSTEM` (APPS is included by normal desktop builds, but APPS without DESKTOP is not covered). Other configurations are a convenience for people building their own runtimes. `MS_WINDOWS_GAMES` is for the Xbox subset of the Windows API, which is also available on client OS, but is restricted compared to `MS_WINDOWS_DESKTOP`. These restrictions may change over time, as they relate to the build headers rather than the OS support, and so we assume that Xbox builds will use the latest available version of the GDK.