summaryrefslogtreecommitdiffstats
path: root/PC
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Remove or update bitbucket links (GH-101963)sblondon2023-03-082-4/+2
| | | | | | Since Mercurial removal from bitbucket.org, some links are broken. They are replaced by github.com or webarchive.org links if available. Otherwise, they are removed. Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-102344: Reimplement winreg QueryValue / SetValue using QueryValueEx / ↵Max Bachmann2023-03-011-60/+122
| | | | | SetValueEx (GH-102345) The newer APIs are more widely available than the old ones, and are called in a way to preserve functionality.
* Remove references to old Windows source files from internal documentation ↵Max Bachmann2023-02-241-5/+0
| | | | (GH-102216)
* gh-102141: replace use of getpid on Windows with GetCurrentProcessId (GH-102142)Max Bachmann2023-02-241-0/+3
|
* gh-101758: Add _PyState_AddModule() Back for the Stable ABI (gh-101956)Eric Snow2023-02-161-0/+1
| | | | | | | We're adding the function back, only for the stable ABI symbol and not as any form of API. I had removed it yesterday. This undocumented "private" function was added with the implementation for PEP 3121 (3.0, 2007) for internal use and later moved out of the limited API (3.6, 2016) and then into the internal API (3.9, 2019). I removed it completely yesterday, including from the stable ABI manifest (where it was added because the symbol happened to be exported). It's unlikely that anyone is using _PyState_AddModule(), especially any stable ABI extensions built against 3.2-3.5, but we're playing it safe. https://github.com/python/cpython/issues/101758
* gh-99108: Refactor _sha256 & _sha512 into _sha2. (#101924)Gregory P. Smith2023-02-161-4/+2
| | | | | | | | | This merges their code. They're backed by the same single HACL* static library, having them be a single module simplifies maintenance. This should unbreak the wasm enscripten builds that currently fail due to linking in --whole-archive mode and the HACL* library appearing twice. Long unnoticed error fixed: _sha512.SHA384Type was doubly assigned and was actually SHA512Type. Nobody depends on those internal names. Also rename LIBHACL_ make vars to LIBHACL_SHA2_ in preperation for other future HACL things.
* gh-101758: Clean Up Uses of Import State (gh-101919)Eric Snow2023-02-151-1/+0
| | | | | | | | | | | | | | | This change is almost entirely moving code around and hiding import state behind internal API. We introduce no changes to behavior, nor to non-internal API. (Since there was already going to be a lot of churn, I took this as an opportunity to re-organize import.c into topically-grouped sections of code.) The motivation is to simplify a number of upcoming changes. Specific changes: * move existing import-related code to import.c, wherever possible * add internal API for interacting with import state (both global and per-interpreter) * use only API outside of import.c (to limit churn there when changing the location, etc.) * consolidate the import-related state of PyInterpreterState into a single struct field (this changes layout slightly) * add macros for import state in import.c (to simplify changing the location) * group code in import.c into sections *remove _PyState_AddModule() https://github.com/python/cpython/issues/101758
* gh-101819: Remove _PyWindowsConsoleIO_Type from the Windows DLL (GH-101904)Erlend E. Aasland2023-02-151-2/+9
| | | Automerge-Triggered-By: GH:erlend-aasland
* GH-101578: Normalize the current exception (GH-101607)Mark Shannon2023-02-081-0/+4
| | | | | | | | | | * Make sure that the current exception is always normalized. * Remove redundant type and traceback fields for the current exception. * Add new API functions: PyErr_GetRaisedException, PyErr_SetRaisedException * Add new API functions: PyException_GetArgs, PyException_SetArgs
* gh-101524: Split Up the _xxsubinterpreters Module (gh-101526)Eric Snow2023-02-041-0/+2
| | | | | This is step 1 in potentially dropping all the "channel"-related code. Channels have already been removed from PEP 554. https://github.com/python/cpython/issues/101524
* gh-101467: Correct py.exe handling of prefix matches and cases when only one ↵Steve Dower2023-02-011-9/+56
| | | | runtime is installed (GH-101468)
* gh-77532: Minor tweaks to allow compiling with PlatformToolset=ClangCL on ↵Steve Dower2023-01-272-20/+26
| | | | | | Windows (GH-101352) To use this, ensure that clang support was selected in Visual Studio Installer, then set the PlatformToolset environment variable to "ClangCL" and build as normal from the command line. It remains unsupported, but at least is possible now for experimentation.
* gh-99834: Update bundled copy of Tcl/Tk to 8.6.13.0 on Windows (GH-101307)Steve Dower2023-01-261-1/+1
|
* gh-101135: Add backwards compatibility to Windows launcher for older 32-bit ↵Martin Boisvert2023-01-241-34/+121
| | | | | | | versions (GH-101138) Python 2.x and up to 3.4 did not contain the "-32" in their registry name, so the 32 and 64-bit installs were treated equal. Since 3.5/PEP 514 this is no longer true, but we still want to detect the EOL versions correctly in case people are still using them. Additionally, the code to replace a node with one with a lower sort key was buggy (wrong node chosen, replace never happened since parent was always NULL, replaced node never freed, etc)
* gh-100247: Fix py.exe launcher not using entire shebang command for finding ↵Steve Dower2023-01-131-65/+85
| | | | custom commands (GH-100944)