1735 Commits

Author SHA1 Message Date
Peter Bierma 2b7c28a440 gh-149101: Implement PEP 788 (GH-149116)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Sam Gross <colesbury@gmail.com>
2026-05-06 17:39:30 -04:00
Petr Viktorin 508b49845d gh-149044: Implement PEP 820 – PySlot: Unified slot system for the C API (GH-149055)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2026-05-05 09:18:04 +02:00
Steve Dower 10f950c9bb gh-148690: Build Windows freethreaded binaries into separate directory and include python3t.dll on GIL-enabled (GH-149218)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-05-04 17:45:08 +01:00
Petr Viktorin 6ca5cdba18 gh-149225: Expose Py_CriticalSection in Stable ABI (GH-149227) 2026-05-04 17:32:17 +02:00
Victor Stinner ce51c18818 gh-146063: Add PyObject_CallFinalizerFromDealloc() to the limited C API (#146172)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-05-04 15:37:45 +02:00
Petr Viktorin 8923ca418c gh-145921: Add "_DuringGC" functions for tp_traverse (GH-145925)
There are newly documented restrictions on tp_traverse:

    The traversal function must not have any side effects.
    It must not modify the reference counts of any Python
    objects nor create or destroy any Python objects.

* Add several functions that are guaranteed side-effect-free,
  with a _DuringGC suffix.
* Use these in ctypes
* Consolidate tp_traverse docs in gcsupport.rst, moving unique
  content from typeobj.rst there

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-04-08 09:15:11 +02:00
Itamar Oren 6cdbd7bc5d gh-122941: Fix test_launcher sporadic failures via py.ini isolation (GH-145090)
Adds _PYLAUNCHER_INIDIR as a private variable since the launcher is deprecated and not getting new features.
2026-03-04 18:06:49 +00:00
Sergey B Kirpichev 4c7ec78092 gh-143869: Add PEP 757 functions to the limited API (#143906)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-01-21 14:47:14 +01:00
AN Long ffc7172124 gh-142579: Remove the self converter hack in winreg.c (GH-142580) 2025-12-11 18:06:26 +01:00
Jeong, YunWon 3ec941b364 gh-142282 Fix winreg.QueryValueEx() under race condition (GH-142283) 2025-12-09 12:09:07 +00:00
Petr Viktorin 226011ba12 gh-139165: Make Py_SIZE, Py_IS_TYPE,Py_ SET_SIZE regular functions in stable ABI (GH-139166)
* Make Py_{SIZE,IS_TYPE,SET_SIZE} regular functions in stable ABI

Group them together with Py_TYPE & Py_SET_TYPE to cut down
on repetitive preprocessor macros.
Format repetitive definitions in object.c more concisely.

Py_SET_TYPE is still left out of the Limited API.
2025-11-25 14:30:33 +01:00
da-woods afa0badcc5 gh-141726: Add PyDict_SetDefaultRef() to the Stable ABI (#141727)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-19 11:38:10 +00:00
Victor Stinner 68266c1f01 gh-141341: Rename COMPILER macro to _Py_COMPILER on Windows (#141342) 2025-11-10 15:50:51 +01:00
AN Long bea0d3d12b gh-140826: Update winreg's docstring (GH-141050) 2025-11-06 17:33:30 +02:00
AN Long 11fc411f98 gh-140916: Remove unused codes in winreg.c (#140934) 2025-11-05 22:49:45 +01:00
Petr Viktorin 589a03a8ce gh-140550: Initial implementation of PEP 793 – PyModExport (GH-140556)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-11-05 12:31:42 +01:00
AN Long 248ce9fa8c gh-140826: Compare winreg.HKEYType by the internal handle value (GH-140843) 2025-11-03 10:14:22 +02:00
Serhiy Storchaka dcf3cc5796 gh-81313: Add the math.integer module (PEP-791) (GH-133909) 2025-10-31 16:13:43 +02:00
Steve Dower c46265d94a gh-139810: Always generate -dev tags for PyManager packages (GH-139814) 2025-10-13 20:43:14 +01:00
Stan Ulbrych 2e8f64c931 gh-71648: Optimize PNG files (GH-138842)
* Only keep > 1 kb savings
2025-09-12 20:13:05 +00:00
Petr Viktorin 097c563e7b gh-137210: Move PYTHON_API_VERSION & PYTHON_ABI_VERSION to patchlevel.h (GH-138545)
Move PYTHON_API_VERSION & PYTHON_ABI_VERSION to patchlevel.h

This allows removing #include "modsupport.h" from python_ver_rc.h,
which allows modsupport.h to use common helpers from Python.h --
specifically, `_Py_PACK_VERSION` for defining limited API.
2025-09-08 12:02:13 +02:00
Petr Viktorin 0c74fc8af0 gh-137210: Add a struct, slot & function for checking an extension's ABI (GH-137212)
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2025-09-05 16:23:18 +02:00
AN Long b3e785c76c gh-138314: Add winreg.DeleteTree (GH-138388) 2025-09-02 17:04:57 +00:00
Peter Bierma 4f6ecd10c2 gh-138342: Use a common utility for visiting an object's type (GH-138343)
Add `_PyObject_VisitType` in place of `tp_traverse` functions that only visit the object's type.
2025-09-01 16:20:33 +00:00
Adam Turner 918e3ba6c0 GH-137623: Use an AC decorator for docstring line length enforcement (#137690) 2025-08-18 18:29:00 +01:00
AN Long d53199101c gh-136586: Improve winreg's module docstring (GH-136587) 2025-07-28 20:19:01 +01:00
Serhiy Storchaka e18829a8ad gh-132629: Deprecate accepting out-of-range values for unsigned integers in PyArg_Parse (GH-132630)
For unsigned integer formats in the PyArg_Parse* functions,
accepting Python integers with value that is larger than
the maximal value the corresponding C type or less than
the minimal value for the corresponding signed integer type
is now deprecated.
2025-07-13 12:44:54 +03:00
Steve Dower afc5ab6cce gh-135455: Fix version and architecture detection in PC/layout script. (GH-135461) 2025-06-13 16:04:43 +01:00
Serhiy Storchaka bac3fcba5b gh-108512: Add and use new replacements for PySys_GetObject() (GH-111035)
Add functions PySys_GetAttr(), PySys_GetAttrString(),
PySys_GetOptionalAttr() and PySys_GetOptionalAttrString().
2025-05-28 20:11:09 +03:00
Chris Eibl e4fbfb1288 GH-130727: Avoid race condition in _wmimodule by copying shared data (GH-134313) 2025-05-20 22:21:25 +01:00
Steve Dower 986c367028 gh-133779: Revert Windows generation of pyconfig.h and go back to a static header. (GH-133966)
Extension builders must specify Py_GIL_DISABLED if they want to link to the free-threaded builds.
This was usually the case already, but this change guarantees it in all circumstances.
2025-05-19 11:35:22 +01:00
AN Long 7a504b3d5d gh-130000: Release the GIL in winreg when doing Windows API calls (GH-130001) 2025-05-16 00:00:06 +01:00
Max Bachmann 74c4e35ff1 Let PyUnicode_FromWideChar calculate the input length (GH-134045) 2025-05-15 11:56:50 +00:00
Xuehai Pan f0f93ba5fa gh-131942: Use the Python-specific Py_DEBUG macro rather than _DEBUG in Windows-related C code (GH-131944) 2025-05-08 15:01:25 +00:00
Zachary Ware 74e2acddf6 Test fixes for 3.15 (GH-133599)
Followup to 942673ed19 (GH-133588)

* Update configure for Python 3.15

* Update magic number for 3.15

* Remove deprecated 'check_home' argument from sysconfig.is_python_build

* Add warningignore entries for Modules/_sqlite/clinic/connection.c.h

* Work around c-analyzer complaints about _testclinic deprecation tests

---------

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-05-07 14:50:39 -05:00
Hugo van Kemenade 9748fb3867 Python 3.15.0a0 2025-05-07 18:47:42 +03:00
Steve Dower ed039b801d gh-132930: Include IDLE path in registry for PyManager packages (GH-133246) 2025-05-01 14:41:17 +01:00
Steve Dower ae37f3d3c0 gh-132930: Fixes PEP 514 registration for PyManager packages on x64 (GH-133154) 2025-04-29 16:20:41 +01:00
Adam Turner 208d06fd51 gh-132930: Fix use of ALIAS_WPREFIX in pymanager builds (GH-133120) 2025-04-29 08:53:43 +00:00
Adam Turner 4d54e9cdf6 GH-132930: Display 'free-threaded' in pymanager builds (GH-133119) 2025-04-29 09:28:04 +01:00
Steve Dower 3940e1f873 gh-132930: Improve the names of IDLE and PyDoc shortcuts (GH-133091) 2025-04-28 19:09:20 +01:00
Steve Dower e20ca6d1b0 gh-132930: Implement PEP 773 (GH-132931)
This change to the core CPython repo:
* Adds PyManager support to PC/layout
* Adds a warning message to the legacy py.exe if subcommands are invoked
* Add deprecation message to traditional installer
* Updates using/windows docs
2025-04-28 13:57:47 +01:00
Bénédikt Tran 96bc1721d2 gh-111178: fix incorrect function signatures for Windows builds (#133072) 2025-04-28 13:05:39 +02:00
Steve Dower 09b624b80f gh-132639: Adds PyLong_AsNativeBytes, PyLong_FromNativeBytes and PyLong_FromUnsignedNativeBytes to the limited API (GH-132640) 2025-04-21 15:59:03 +01:00
Steve Dower b87189deae gh-132649: Allow passing --include-tcltk to PC\layout on Windows ARM64 (GH-132650) 2025-04-17 20:14:00 +01:00
Adam Turner 231a50fa9a gh-109599: Expose CapsuleType via the _types module (#131969) 2025-04-04 23:37:41 +01:00
Bénédikt Tran 0a97427ee5 gh-99108: Implement HACL* HMAC (#130157)
A new extension module, `_hmac`, now exposes the HACL* HMAC (formally verified) implementation.

The HACL* implementation is used as a fallback implementation when the OpenSSL implementation of HMAC
is not available or disabled. For now, only named hash algorithms are recognized and SIMD support provided
by HACL* for the BLAKE2 hash functions is not yet used.
2025-04-04 19:04:00 +02:00
Chris Eibl 7cbcb6efd9 GH-131296: Fix parenthesis warnings on Windows-specific code (GH-131905) 2025-03-31 15:54:30 +01:00
Michael Droettboom 8614f86b71 gh-131525: Cache the result of tuple_hash (#131529)
* gh-131525: Cache the result of tuple_hash

* Fix debug builds

* Add blurb

* Fix formatting

* Pre-compute empty tuple singleton

* Mostly set the cache within tuple_alloc

* Fixes for TSAN

* Pre-compute empty tuple singleton

* Fix for 32-bit platforms

* Assert that op != NULL in _PyTuple_RESET_HASH_CACHE

* Use FT_ATOMIC_STORE_SSIZE_RELAXED macro

* Update Include/internal/pycore_tuple.h

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Fix alignment

* atomic load

* Update Objects/tupleobject.c

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2025-03-27 09:57:06 -04:00
Victor Stinner 9ef9d687ff gh-131712: Build _suggestions extension on Windows (#131759)
Add a test checking that the '_suggestions' extension is available.
2025-03-27 09:53:39 +01:00