summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* Python 3.12.0rc2v3.12.0rc2Thomas Wouters2023-09-051-2/+2
|
* [3.12] GH-108390: Prevent non-local events being set with ↵Mark Shannon2023-09-053-8/+15
| | | | | | | | | | | `sys.monitoring.set_local_events()` (GH-108420) (#108899) * GH-108390: Prevent non-local events being set with `sys.monitoring.set_local_events()` (GH-108420) * Restore generated objects * Restore size of monitoring arrays in code object for 3.12 ABI compatibility. * Update ABI file
* [3.12] gh-63760: Don't declare gethostname() on Solaris (#108817) (#108824)Victor Stinner2023-09-021-5/+0
| | | | | | | | | | | | | | | | gh-63760: Don't declare gethostname() on Solaris (#108817) Since 2005, Solaris defines gethostname(). socketmodule.c no longer has to define gethostname() for Solaris. Oracle Solaris and OpenSolaris have patches to remove the gethostname() definition in Python: * https://github.com/oracle/solaris-userland/blob/master/components/python/python37/patches/15-gethostname.patch * https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/python/python37/patches/15-gethostname.patch * https://github.com/omniosorg/omnios-build/blob/master/build/python27/patches/24-gethostname.patch Co-authored-by: Jakub Kulík <Kulikjak@gmail.com> (cherry picked from commit 0e6d582b3b73a88e71cae04327b31a1ee203722c)
* [3.12] gh-106242: Fix path truncation in os.path.normpath (GH-106816) (#107981)Steve Dower2023-08-161-1/+2
| | | | | | | | | * gh-106242: Fix path truncation in os.path.normpath (GH-106816) * gh-106242: Minor fixup to avoid compiler warnings --------- Co-authored-by: Finn Womack <flan313@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters ↵Eric Snow2023-08-163-6/+23
| | | | | | | | | | | (#107751) * Unrevert "[3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters (gh-107567) (#107599)". This reverts commit 6e4eec760648a71e1cd8f8f551997b1823b4bb9f (gh-107648). * Initialize each interpreter's refchain properly. * Skip test_basic_multiple_interpreters_deleted_no_reset on tracerefs builds.
* [3.12] gh-91051: fix segfault when using all 8 type watchers (GH-107853) ↵Miss Islington (bot)2023-08-161-1/+1
| | | | | | | | (#107876) * gh-91051: fix segfault when using all 8 type watchers (GH-107853) (cherry picked from commit 66e4edd7346b1cd65ddff6da890a0d725e325116) Co-authored-by: Carl Meyer <carl@oddbird.net>
* [3.12] GH-107724: Fix the signature of `PY_THROW` callback functions. ↵Miss Islington (bot)2023-08-111-4/+0
| | | | | | | | (GH-107725) (#107802) GH-107724: Fix the signature of `PY_THROW` callback functions. (GH-107725) (cherry picked from commit 52fbcf61b5a70993c2d32332ff0ad9f369d968d3) Co-authored-by: Mark Shannon <mark@hotpy.org>
* Post 3.12.0rc1Thomas Wouters2023-08-061-1/+1
|
* Python 3.12.0rc1v3.12.0rc1Thomas Wouters2023-08-051-3/+3
|
* [3.12] gh-107630: Revert "[3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under ↵Eric Snow2023-08-053-22/+6
| | | | | | | Isolated Subinterpreters (gh-107567) (#107599)" (#107648) Revert "[3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters (gh-107567) (#107599)" This reverts commit 58af2293c52a1ad3754d254690c0e54f787c545b.
* [3.12] GH-107263: Increase C stack limit for most functions, except ↵Miss Islington (bot)2023-08-041-1/+2
| | | | | | | | | | `_PyEval_EvalFrameDefault()` (GH-107535) (#107618) GH-107263: Increase C stack limit for most functions, except `_PyEval_EvalFrameDefault()` (GH-107535) * Set C recursion limit to 1500, set cost of eval loop to 2 frames, and compiler mutliply to 2. (cherry picked from commit fa45958450aa3489607daf9855ca0474a2a20878) Co-authored-by: Mark Shannon <mark@hotpy.org>
* [3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters ↵Miss Islington (bot)2023-08-033-6/+22
| | | | | | | | | | (gh-107567) (#107599) gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters (gh-107567) The linked list of objects was a global variable, which broke isolation between interpreters, causing crashes. To solve this, we've moved the linked list to each interpreter. (cherry picked from commit 58ef74186795c56e3ec86e8c8f351a1d7826638a) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] gh-105699: Use a _Py_hashtable_t for the PyModuleDef Cache ↵Eric Snow2023-07-283-17/+6
| | | | | | | | | | | | | (gh-106974) (gh-107412) gh-105699: Use a _Py_hashtable_t for the PyModuleDef Cache (gh-106974) This fixes a crasher due to a race condition, triggered infrequently when two isolated (own GIL) subinterpreters simultaneously initialize their sys or builtins modules. The crash happened due the combination of the "detached" thread state we were using and the "last holder" logic we use for the GIL. It turns out it's tricky to use the same thread state for different threads. Who could have guessed? We solve the problem by eliminating the one object we were still sharing between interpreters. We replace it with a low-level hashtable, using the "raw" allocator to avoid tying it to the main interpreter. We also remove the accommodations for "detached" thread states, which were a dubious idea to start with. (cherry picked from commit 8ba4df91ae60833723d8d3b9afeb2b642f7176d5)
* [3.12] GH-106895: Raise a `ValueError` when attempting to disable events ↵Mark Shannon2023-07-281-1/+2
| | | | that cannot be disabled. (GH-107337) (GH-107351)
* [3.12] GH-106897: Add `RERAISE` event to `sys.monitoring`. (GH-107291) ↵Mark Shannon2023-07-282-4/+5
| | | | | | (GH-107346) * Ensures that exception handling events are balanced. Each [re]raise event has a matching unwind/handled event.
* [3.12] gh-101524: Only Use Public C-API in the _xxsubinterpreters Module ↵Miss Islington (bot)2023-07-273-15/+21
| | | | | | | | (gh-105258) (gh-107303) The _xxsubinterpreters module was meant to only use public API. Some internal C-API usage snuck in over the last few years (e.g. gh-28969). This fixes that. (cherry picked from commit e6373c0d8b59512aa7f0dea7f3fb162b6ed10fa4) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] gh-107226: PyModule_AddObjectRef() should only be in the limited API ↵Miss Islington (bot)2023-07-251-0/+2
| | | | | | | 3.10 (GH-107227) (GH-107260) (cherry picked from commit 698b01513550798886add5e06a1c3f9a89d7dfc6) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-105059: Fix MSCV compiler warning on PyObject union (GH-107239) ↵Miss Islington (bot)2023-07-251-0/+11
| | | | | | | | | | | (#107248) gh-105059: Fix MSCV compiler warning on PyObject union (GH-107239) Use pragma to ignore the MSCV compiler warning on the PyObject nameless union. (cherry picked from commit 1c8fe9bdb624d356643ee569151a9e4f2963179a) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-105059: Use GCC/clang extension for PyObject union (GH-107232) ↵Miss Islington (bot)2023-07-251-0/+5
| | | | | | | | | | | | (#107236) gh-105059: Use GCC/clang extension for PyObject union (GH-107232) Anonymous union is new in C11. To prevent compiler warning when using -pedantic compiler option, use Clang and GCC extension on C99 and older. (cherry picked from commit 6261585d63a31835b65d445d99dc14cca3fe9cf5) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-102304: Rename _Py_IncRefTotal_DO_NOT_USE_THIS() (GH-107193) (#107199)Miss Islington (bot)2023-07-241-9/+4
| | | | | | | | | | gh-102304: Rename _Py_IncRefTotal_DO_NOT_USE_THIS() (GH-107193) * Rename _Py_IncRefTotal_DO_NOT_USE_THIS() to _Py_INCREF_IncRefTotal() * Rename _Py_DecRefTotal_DO_NOT_USE_THIS() to _Py_DECREF_DecRefTotal() * Remove temporary _Py_INC_REFTOTAL() and _Py_DEC_REFTOTAL() macros (cherry picked from commit 8ebc9fc321ba1eeb3282c2170f351c54956893e6) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-98608: Move PyInterpreterConfig to pylifecycle.h (GH-107191) (#107198)Miss Islington (bot)2023-07-242-39/+39
| | | | | | | | | | gh-98608: Move PyInterpreterConfig to pylifecycle.h (GH-107191) Move PyInterpreterConfig structure and associated macros from initconfig.h to pylifecycle.h: it's not related to the Python Initialization Configuration. (cherry picked from commit e717b47ed8ae7017f0bfb835fe673aa836e8fcca) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] GH-96803: Move PyUnstable_InterpreterFrame_GetCode() to Python.h ↵Miss Islington (bot)2023-07-242-17/+17
| | | | | | | | | | | | (GH-107188) (#107195) GH-96803: Move PyUnstable_InterpreterFrame_GetCode() to Python.h (GH-107188) Declare the following 3 PyUnstable functions in Include/cpython/pyframe.h rather than Include/cpython/frameobject.h, so they are now provided by the standard "GH-include <Python.h>". (cherry picked from commit 837fa5c0cd92e70f625377c9ffb7ac31a23d7d63) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] GH-103082: Rename PY_MONITORING_EVENTS to _PY_MONITORING_EVENTS ↵Victor Stinner2023-07-222-5/+5
| | | | | | | | | | | | (#107069) (#107075) GH-103082: Rename PY_MONITORING_EVENTS to _PY_MONITORING_EVENTS (#107069) Rename private C API constants: * Rename PY_MONITORING_UNGROUPED_EVENTS to _PY_MONITORING_UNGROUPED_EVENTS * Rename PY_MONITORING_EVENTS to _PY_MONITORING_EVENTS (cherry picked from commit 0927a2b25c059988e237108605ed8ab0c5459c53)
* [3.12] gh-86493: Fix possible leaks in some modules initialization ↵Serhiy Storchaka2023-07-181-0/+1
| | | | | | (GH-106768) (GH-106855) Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time. (cherry picked from commit 3e65baee72131b49f4ce8ca2da568a6f2001ce93)
* Post 3.12.0b4Thomas Wouters2023-07-111-1/+1
|
* Python 3.12.0b4v3.12.0b4Thomas Wouters2023-07-111-2/+2
|
* [3.12] gh-105227: Add PyType_GetDict() (GH-105747) (#106600)Miss Islington (bot)2023-07-101-0/+1
| | | | | | | | | | gh-105227: Add PyType_GetDict() (GH-105747) This compensates for static builtin types having `tp_dict` set to `NULL`. (cherry picked from commit a840806d338805fe74a9de01081d30da7605a29f) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.12] gh-105340: include hidden fast-locals in locals() (GH-105715) (#106470)Miss Islington (bot)2023-07-052-0/+4
| | | | | | | | gh-105340: include hidden fast-locals in locals() (GH-105715) * gh-105340: include hidden fast-locals in locals() (cherry picked from commit 104d7b760fed18055e4f04e5da3ca619e28bfc81) Co-authored-by: Carl Meyer <carl@oddbird.net>
* [3.12] gh-77782: Deprecate Py_HasFileSystemDefaultEncoding (GH-106272) (#106274)Miss Islington (bot)2023-06-301-1/+1
| | | | | | | | gh-77782: Deprecate Py_HasFileSystemDefaultEncoding (GH-106272) Deprecate Py_HasFileSystemDefaultEncoding variable. (cherry picked from commit f3cf2ddd8ddc7dfa6b06e6da640391a1bcd62b8a) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-106140: Reorder some more fields to facilitate out-of-process ↵Pablo Galindo Salgado2023-06-271-7/+8
| | | | | inspection (GH-106148) (#106155) (cherry picked from commit 9126a6a9ce3772d5dc785cbee159b07a1ff7d531)
* [3.12] gh-106140: Reorder some fields to facilitate out-of-process ↵Miss Islington (bot)2023-06-272-41/+52
| | | | | | | | | inspection (GH-106143) (#106147) gh-106140: Reorder some fields to facilitate out-of-process inspection (GH-106143) (cherry picked from commit 2d5a1c281161d037148ffb5983decc6d31c2557d) Signed-off-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* Post 3.12.0b3Thomas Wouters2023-06-201-1/+1
|
* Python 3.12.0b3v3.12.0b3Thomas Wouters2023-06-191-2/+2
|
* [3.12] gh-105587: Remove assertion from `_PyStaticObject_CheckRefcnt` ↵Miss Islington (bot)2023-06-141-3/+2
| | | | | | | | (GH-105638) (#105769) gh-105587: Remove assertion from `_PyStaticObject_CheckRefcnt` (GH-105638) (cherry picked from commit 6199fe3b3236748033a7ce2559aeddb5a91bbbd9) Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com>
* [3.12] gh-105387: Limited C API implements Py_INCREF() as func (GH-105388) ↵Miss Islington (bot)2023-06-141-8/+10
| | | | | | | | | | | | (#105763) gh-105387: Limited C API implements Py_INCREF() as func (GH-105388) In the limited C API version 3.12, Py_INCREF() and Py_DECREF() functions are now implemented as opaque function calls to hide implementation details. (cherry picked from commit b542972dc133973a7f0517aa1b61779271789111) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-104812: Run Pending Calls in any Thread (gh-104813) (gh-105752)Eric Snow2023-06-144-27/+24
| | | | For a while now, pending calls only run in the main thread (in the main interpreter). This PR changes things to allow any thread run a pending call, unless the pending call was explicitly added for the main thread to run. (cherry picked from commit 757b402)
* [3.12] gh-105603: Change the PyInterpreterConfig.own gil Field (gh-105620) ↵Miss Islington (bot)2023-06-131-3/+7
| | | | | | | | (gh-105731) We are changing it to be more flexible that a strict bool can be for possible future expanded used cases. (cherry picked from commit b97e14a806477af4225777d215ac38c0d9b845f0) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] gh-102304: Fix Py_INCREF() for limited C API 3.9 (#105553)Victor Stinner2023-06-091-2/+14
| | | | | | | | | | | | | | | | | * gh-102304: Fix Py_INCREF() for limited C API 3.9 (#105550) When Python is built in debug mode (Py_REF_DEBUG macro), Py_INCREF() and Py_DECREF() of the limited C API 3.9 (and older) now call Py_IncRef() and Py_DecRef(), since _Py_IncRef() and _Py_DecRef() were added to Python 3.10. (cherry picked from commit 7ba0fd9f87ad75f8eda8e002c2fc71049b815f33) * gh-102304: Remove Py_INCREF() doc change (#105552) Py_INCREF() was made compatible again with Python 3.9 and older in the limited API of Python debug mode. (cherry picked from commit 58e4b69f698e6fd0694a58f18679bbe0e7e50e91)
* [3.12] gh-100227: Lock Around Modification of the Global Allocators State ↵Miss Islington (bot)2023-06-082-3/+4
| | | | | | | | (gh-105516) (gh-105532) The risk of a race with this state is relatively low, but we play it safe anyway. We do avoid using the lock in performance-sensitive cases where the risk of a race is very, very low. (cherry picked from commit 68dfa496278aa21585eb4654d5f7ef13ef76cb50) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] gh-100227: Lock Around Adding Global Audit Hooks (gh-105515) (gh-105525)Eric Snow2023-06-081-1/+4
| | | | The risk of a race with this state is relatively low, but we play it safe anyway. (cherry picked from commit e822a676f1f3bef6c5413e9b856db481c08ac2a5)
* [3.12] gh-100227: Lock Around Use of the Global "atexit" State (gh-105514) ↵Miss Islington (bot)2023-06-081-0/+1
| | | | | | | | (gh-105517) The risk of a race with this state is relatively low, but we play it safe anyway. (cherry picked from commit 7799c8e678f759c7787785c6287140abe641d1b9) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* Merge branch '3.12' of https://github.com/python/cpython into 3.12Thomas Wouters2023-06-061-14/+8
|\
| * [3.12] gh-102304: Fix Py_INCREF() stable ABI in debug mode (#104763) (#105352)Victor Stinner2023-06-061-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gh-102304: Fix Py_INCREF() stable ABI in debug mode (#104763) 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. (cherry picked from commit 92022d8416d9e175800b65c4d71d4e4fb47adcb0)
* | Post 3.12.0b2Thomas Wouters2023-06-061-1/+1
| |
* | Python 3.12.0b2v3.12.0b2Thomas Wouters2023-06-061-2/+2
|/
* [3.12] gh-104341: Call _PyEval_ReleaseLock() with NULL When Finalizing the ↵Miss Islington (bot)2023-06-011-1/+1
| | | | | | | | | | Current Thread (gh-105109) (gh-105209) This avoids the problematic race in drop_gil() by skipping the FORCE_SWITCHING code there for finalizing threads. (The idea for this approach came out of discussions with @markshannon.) (cherry picked from commit 3698fda) Co-authored-by: Eric Snow ericsnowcurrently@gmail.com
* [3.12] gh-105020: Share tp_bases and tp_mro Between Interpreters For All ↵Miss Islington (bot)2023-06-012-4/+17
| | | | | | | | Static Builtin Types (gh-105115) (gh-105124) In gh-103912 we added tp_bases and tp_mro to each PyInterpreterState.types.builtins entry. However, doing so ignored the fact that both PyTypeObject fields are public API, and not documented as internal (as opposed to tp_subclasses). We address that here by reverting back to shared objects, making them immortal in the process. (cherry picked from commit 7be667d) Co-authored-by: Eric Snow ericsnowcurrently@gmail.com
* [3.12] gh-102304: Fix 2 New Stable ABI Functions (gh-104762) (gh-105123)Eric Snow2023-05-311-1/+1
|
* gh-88745: Add _winapi.CopyFile2 and update shutil.copy2 to use it (GH-105055)Miss Islington (bot)2023-05-304-0/+18
| | | | | (cherry picked from commit cda1bd3c9d3b2cecdeeba0c498cd2df83fbdb535) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.12] gh-105071: add PyUnstable_Exc_PrepReraiseStar to expose except* ↵Irit Katriel2023-05-301-0/+4
| | | | | implementation in the unstable API (GH-105072) (#105095) (cherry picked from commit b7aadb4583b040ddc8564896b91f4e5e571c82d6)