summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-124871: fix 'visited' tracking in compiler's reachability analysis ↵Miss Islington (bot)2024-10-041-2/+3
| | | | | | | | (GH-124952) (#124977) gh-124871: fix 'visited' tracking in compiler's reachability analysis (GH-124952) (cherry picked from commit f474391b26aa9208b44ca879f8635409d322f738) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.13] gh-124442: make `__static_attributes__` deterministic by sorting ↵Jelle Zijlstra2024-10-011-1/+12
| | | | | | | | | | | | (GH-124492) (#124738) * [3.13] gh-124442: make `__static_attributes__` deterministic by sorting (GH-124492) (cherry picked from commit 04c837d9d8a474777ef9c1412fbba14f0682366c) Co-authored-by: Kira <kp2pml30@gmail.com> Signed-off-by: kp2pml30 <kp2pml30@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.13] GH-124567: Revert the Incremental GC in 3.13 (#124770)T. Wouters2024-09-302-575/+335
| | | | | Revert the incremental GC in 3.13, since it's not clear that without further turning, the benefits outweigh the costs. Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.13] gh-123892: Add "_wmi" to sys.stdlib_module_names (GH-123893) (#123896)Miss Islington (bot)2024-09-301-0/+1
| | | | | | gh-123892: Add "_wmi" to sys.stdlib_module_names (GH-123893) (cherry picked from commit fb1b51a58df4315f7ef3171a5abeb74f132b0971) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.13] gh-124746: remove assertion on exits having line numbers (#124762)Irit Katriel2024-09-301-16/+0
| | | gh-124746: remove assertion in 3.13
* [3.13] gh-116510: Fix crash during sub-interpreter shutdown (gh-124645) ↵Miss Islington (bot)2024-09-271-3/+26
| | | | | | | | | | | | (#124649) gh-116510: Fix crash during sub-interpreter shutdown (gh-124645) Fix a bug that can cause a crash when sub-interpreters use "basic" single-phase extension modules. Shared objects could refer to PyGC_Head nodes that had been freed as part of interpreter shutdown. (cherry picked from commit 6f9525dd3f0ef5809106ca0923a7512d666a04bb) Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
* [3.13] gh-124160: Pass main_tstate to update_global_state_for_extension() ↵Miss Islington (bot)2024-09-231-1/+1
| | | | | | | | (GH-124164) (#124250) gh-124160: Pass main_tstate to update_global_state_for_extension() (GH-124164) (cherry picked from commit 7331d0f70bc9fbac177b76b6ec03486430383425) Co-authored-by: luk1337 <priv.luk@gmail.com>
* [3.13] gh-123880: Allow recursive import of single-phase-init modules ↵Miss Islington (bot)2024-09-231-5/+13
| | | | | | | | | | | (GH-123950) (#124273) gh-123880: Allow recursive import of single-phase-init modules (GH-123950) (cherry picked from commit aee219f4558dda619bd86e4b0e028ce47a5e4b77) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Brett Cannon <brett@python.org>
* [3.13] GH-123545: Remove duplicate Py_DECREF when handling ↵Savannah Ostrowski2024-09-062-4/+0
| | | | | | | _PyOptimizer_Optimize errors (GH-123759) (cherry picked from commit 1fbc118c5d3916e920a57cda3cb6d9a0292de26e) Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
* [3.13] gh-123275: Support `-Xgil=1` and `PYTHON_GIL=1` on non-free-threaded ↵Miss Islington (bot)2024-09-061-4/+8
| | | | | | | | builds (gh-123276) (gh-123753) gh-123275: Support `-Xgil=1` and `PYTHON_GIL=1` on non-free-threaded builds (gh-123276) (cherry picked from commit 84ad264ce602fb263a46a4536377bdc830eea81e) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* [3.13] gh-121804: always show error location for SyntaxError's in basic repl ↵Miss Islington (bot)2024-09-031-0/+31
| | | | | | | | (GH-123202) (#123631) gh-121804: always show error location for SyntaxError's in basic repl (GH-123202) (cherry picked from commit 6822cb23c62032381971d8a47fd41d1e98710a8c) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* [3.13] gh-123091: Use more _Py_IsImmortalLoose() (GH-123602) (GH-123622)Petr Viktorin2024-09-031-1/+1
| | | | | | | | | Switch more _Py_IsImmortal(...) assertions to _Py_IsImmortalLoose(...) The remaining calls to _Py_IsImmortal are in free-threaded-only code, initialization of core objects, tests, and guards that fall back to code that works with mortal objects. (cherry picked from commit 57c471a6880956338549380fc5fb35c986937901)
* [3.13] gh-98442: fix locations of with statement's cleanup instructions ↵Miss Islington (bot)2024-09-021-1/+3
| | | | | | | | | | | (GH-120763) (#120786) gh-98442: fix locations of with statement's cleanup instructions (GH-120763) (cherry picked from commit 55596ae0446e40f47e2a28b8897fe9530c32a19a) gh-98442: fix location of with statement's cleanup instructions Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.13] gh-93691: fix too broad source locations of with-statement ↵Miss Islington (bot)2024-09-021-3/+2
| | | | | | | | instructions (GH-120125) (#123604) gh-93691: fix too broad source locations of with-statement instructions (GH-120125) (cherry picked from commit eca3f7762c23b22a73a5e0b09520748c88aab4a0) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.13] gh-123091: Use _Py_IsImmortalLoose() (#123511) (#123600)Victor Stinner2024-09-023-6/+6
| | | | | | | | gh-123091: Use _Py_IsImmortalLoose() (#123511) Use _Py_IsImmortalLoose() in bytesobject.c, typeobject.c and ceval.c. (cherry picked from commit f1a0d96f41db9dfa5d7f0b32e72f6f7301a86f91)
* [3.13] GH-117759: Document incremental GC (GH-123266) (#123395)Miss Islington (bot)2024-09-021-11/+16
| | | | | | | | | | GH-117759: Document incremental GC (GH-123266) * Update what's new * Update gc module docs and fix inconsistency in gc.get_objects (cherry picked from commit f49a91648aac2ad55b2e005ba28fac1c7edca020) Co-authored-by: Mark Shannon <mark@hotpy.org>
* [3.13] GH-122298: Restore printing of GC stats (GH-123261) (#123268)Miss Islington (bot)2024-09-021-0/+25
| | | | | | GH-122298: Restore printing of GC stats (GH-123261) (cherry picked from commit 7cd3aa42f0cf72bf9a214e2630850879fe078377) Co-authored-by: Mark Shannon <mark@hotpy.org>
* [3.13] Fix typos in docs, error messages and comments (#122502) (#122606)Alex Waygood2024-09-021-1/+1
| | | | | | | | Fix typos in docs, error messages and comments (#122502) (cherry-picked from commit 46f5a4f9e1781ad8d60eb53bbaf6cd8534a286cd) Signed-off-by: jianghuyiyuan <shuangcui@live.com> Co-authored-by: jianghuyiyuan <shuangcui@live.com>
* [3.13] gh-123142: fix too wide source location of GET_ITER/GET_AITER ↵Irit Katriel2024-08-281-8/+7
| | | | | (GH-123420). (#123435) (cherry picked from commit 61bef6245c4a32bf430d684ede8603f423d63284)
* [3.13] gh-123344: Add missing ast optimizations for PEP 696 (GH-123377) ↵Miss Islington (bot)2024-08-281-0/+3
| | | | | | | | | | (#123427) (cherry picked from commit be083cee34d62ae860acac70dfa078fc5c96ade3) Co-authored-by: Bogdan Romanyuk <65823030+wrongnull@users.noreply.github.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.13] gh-123083: Fix a potential use-after-free in ``STORE_ATTR_WITH… ↵Donghee Na2024-08-222-8/+10
| | | | | | (#123235) [3.13] gh-123083: Fix a potential use-after-free in ``STORE_ATTR_WITH_HINT`` (gh-123092) (cherry picked from commit 297f2e093ec95800ae2184330b8408c875523467)
* [3.13] gh-123142: Fix too wide source locations in tracebacks of exceptions ↵Irit Katriel2024-08-221-2/+3
| | | | | from broken iterables in comprehensions (GH-123173). (#123209) (cherry picked from commit ec89620e5e147ba028a46dd695ef073a72000b84)
* [3.13] gh-122712: Guard against __code__ reassignment in ↵mpage2024-08-212-0/+4
| | | | CALL_ALLOC_AND_ENTER_INIT (GH-122713) (GH-123184)
* [3.13] gh-123048: Fix missing source location in pattern matching code ↵Miss Islington (bot)2024-08-201-1/+1
| | | | | | | | (GH-123167) (#123169) gh-123048: Fix missing source location in pattern matching code (GH-123167) (cherry picked from commit bffed80230f2617de2ee02bd4bdded1024234dab) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.13] Add debug offsets for free threaded builds (GH-123041) (#123055)Miss Islington (bot)2024-08-182-2/+4
| | | | | | | | | | | | * Add debug offsets for free threaded builds (GH-123041) (cherry picked from commit d7a3df91505faa56c51d169648253bd0d57ddae2) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> * Refresh ABI file --------- Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.13] gh-122247: Move instruction instrumentation sanity check after ↵Miss Islington (bot)2024-08-161-1/+1
| | | | | | | tracing check (GH-122251) (GH-122812) (cherry picked from commit 57d7c3e78fb635a0c6ccce38ec3e2f4284d5fac7) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* [3.13] gh-118814: Fix the TypeVar constructor when name is passed by keyword ↵Serhiy Storchaka2024-08-081-1/+1
| | | | | | | | (GH-122664) (GH-122806) Fix _PyArg_UnpackKeywordsWithVararg for the case when argument for positional-or-keyword parameter is passed by keyword. There was only one such case in the stdlib -- the TypeVar constructor. (cherry picked from commit 540fcc62f5da982b79504221cac01bfab8b73ba1)
* [3.13] gh-122728: Fix SystemError in PyEval_GetLocals() (GH-122735) (#122757)Miss Islington (bot)2024-08-061-1/+1
| | | | | | | | | | | | gh-122728: Fix SystemError in PyEval_GetLocals() (GH-122735) Fix PyEval_GetLocals() to avoid SystemError ("bad argument to internal function"). Don't redefine the 'ret' variable in the if block. Add an unit test on PyEval_GetLocals(). (cherry picked from commit 4767a6e31c0550836b2af45d27e374e721f0c4e6) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.13] gh-122445: populate only modified fields in __static_attributes__ ↵Irit Katriel2024-08-021-15/+15
| | | | | | | (#122446) (#122621) gh-122445: populate only modified fields in __static_attributes__ (#122446) (cherry picked from commit 498376d7a7d6f704f22a2c963130cc15c17e7a6f)
* [3.13] gh-122334: Fix crash when importing ssl after re-initialization ↵Miss Islington (bot)2024-08-021-0/+13
| | | | | | | | | | (GH-122481) (#122614) gh-122334: Fix crash when importing ssl after re-initialization (GH-122481) * Fix crash when importing ssl after re-initialization (cherry picked from commit 9fc1c992d6fcea0b7558c581846eef6bdd811f6c) Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
* [3.13] gh-117657: Avoid race in `PAUSE_ADAPTIVE_COUNTER` in free-threaded ↵Miss Islington (bot)2024-07-301-1/+2
| | | | | | | | | | build (GH-122190) (#122475) The adaptive counter doesn't do anything currently in the free-threaded build and TSan reports a data race due to concurrent modifications to the counter. (cherry picked from commit 2b163aa9e796b312bb0549d49145d26e4904768e) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] GH-116090: Fire RAISE events from _FOR_ITER_TIER_TWO (GH-122419)Brandt Bucher2024-07-294-12/+11
| | | (cherry picked from commit 15d4cd096758ca089c6bd6ed808c34cca676d9bb)
* [3.13] gh-122201: Lock mutex when setting handling_thread to NULL ↵Miss Islington (bot)2024-07-261-3/+15
| | | | | | | | | | (GH-122204) (#122319) In the free-threaded build, we need to lock pending->mutex when clearing the handling_thread in order not to race with a concurrent make_pending_calls in the same interpreter. (cherry picked from commit c557ae97d6bd9d04164a19b4fe136610e54dbdd8) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-122029: Log call events in sys.setprofile when it's a method with ↵Miss Islington (bot)2024-07-231-0/+13
| | | | | | | | | | c function (GH-122072) (GH-122205) gh-122029: Log call events in sys.setprofile when it's a method with c function (GH-122072) Log call events in sys.setprofile when it is a method with a C function. (cherry picked from commit e91ef13861e88c27aed51a24e58d1dcc855a01dc) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* [3.13] gh-121390: tracemalloc: Fix tracebacks memory leak (GH-121391) (#121392)Miss Islington (bot)2024-07-211-1/+1
| | | | | | | | | | | gh-121390: tracemalloc: Fix tracebacks memory leak (GH-121391) The tracemalloc_tracebacks hash table has traceback keys and NULL values, but its destructors do not reflect this -- key_destroy_func is NULL while value_destroy_func is raw_free. Swap these to free the traceback keys instead. (cherry picked from commit db39bc42f90c151b298f97b780e62703adbf1221) Co-authored-by: Josh Brobst <jbrobst@proton.me>
* [3.13] gh-120973: Fix thread-safety issues with `threading.local` ↵Miss Islington (bot)2024-07-191-0/+3
| | | | | | | | | | | (GH-121655) (#122042) This is a small refactoring to the current design that allows us to avoid manually iterating over threads. This should also fix gh-118490. (cherry picked from commit e059aa6b01030310125477c3ed1da0491020fe10) Co-authored-by: mpage <mpage@meta.com>
* [3.13] gh-121905: Consistently use "floating-point" instead of "floating ↵Serhiy Storchaka2024-07-191-2/+2
| | | | | point" (GH-121907) (GH-122012) (cherry picked from commit 1a0c7b9ba48a2dffb70bb0c7327abae1d3e87356)
* [3.13] gh-118934: Make PyEval_GetLocals return borrowed reference ↵Miss Islington (bot)2024-07-181-1/+32
| | | | | | | | | (GH-119769) (#121869) gh-118934: Make PyEval_GetLocals return borrowed reference (GH-119769) (cherry picked from commit e65cb4c6f01a687f451ad9db1600525e1c5832c4) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com> Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
* [3.13] gh-121621: Move asyncio_running_loop to private struct (GH-121939) ↵Miss Islington (bot)2024-07-181-2/+2
| | | | | | | | | | (#121943) gh-121621: Move asyncio_running_loop to private struct (GH-121939) This avoids changing the ABI and keeps the field in the private struct. (cherry picked from commit 81fd625b5c30cc6f417c93bad404923676ad8ca3) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-121153: Fix some errors with use of _PyLong_CompactValue() ↵Serhiy Storchaka2024-07-171-2/+2
| | | | | | | | | (GH-121154) (GH-121900) * The result has type Py_ssize_t, not intptr_t. * Type cast between unsigned and signed integer types should be explicit. * Downcasting should be explicit. * Fix integer overflow check in sum(). (cherry picked from commit 1801545)
* [3.13] GH-121583: Remove dependency from pystats.h to internal header file ↵Miss Islington (bot)2024-07-161-0/+4
| | | | | | | (GH-121880) (cherry picked from commit f036a463dbc43d25712183dc6afa4e38c1aaf93d) Co-authored-by: Michael Droettboom <mdboom@gmail.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* [3.13] gh-121621: Move asyncio running loop to thread state (GH-121695) ↵Miss Islington (bot)2024-07-161-0/+4
| | | | | | | | (GH-121864) gh-121621: Move asyncio running loop to thread state (GH-121695) (cherry picked from commit 69c68de43aef03dd52fabd21f99cb3b0f9329201) Co-authored-by: Ken Jin <kenjin@python.org>
* [3.13] gh-121814: Only check f_trace_opcodes if Python frame exists ↵Miss Islington (bot)2024-07-161-1/+1
| | | | | | | | | (GH-121818) (#121861) gh-121814: Only check f_trace_opcodes if Python frame exists (GH-121818) (cherry picked from commit 2b1b68939b15b913080a3403e3ba18e2a1f520ef) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com> Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
* [3.13] gh-120317: Lock around global state in the tokenize module ↵Miss Islington (bot)2024-07-161-43/+72
| | | | | | | | (GH-120318) (#121841) (cherry picked from commit 8549559f383dfcc0ad0c32496f62a4b737c05b4f) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* [3.13] gh-121794: Don't set `ob_tid` to zero in fast-path dealloc ↵Miss Islington (bot)2024-07-151-11/+54
| | | | | | | | | | | | | | | | | (GH-121799) (#121821) We should maintain the invariant that a zero `ob_tid` implies the refcount fields are merged. * Move the assignment in `_Py_MergeZeroLocalRefcount` to immediately before the refcount merge. * Update `_PyTrash_thread_destroy_chain` to set `ob_ref_shared` to `_Py_REF_MERGED` when setting `ob_tid` to zero. Also check this invariant with assertions in the GC in debug builds. That uncovered a bug when running out of memory during GC. (cherry picked from commit d23be3947ced081914f4458c84f729c9c37f0219) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-121546: Disable contextvar caching on free-threading build ↵Miss Islington (bot)2024-07-151-0/+14
| | | | | | | | (GH-121740) (#121808) gh-121546: Disable contextvar caching on free-threading build (GH-121740) (cherry picked from commit e904300882055bed71cae59f8ca9161066659b7c) Co-authored-by: Ken Jin <kenjin@python.org>
* [3.13] gh-121657: Display correct error message for yield from outsid… ↵Kirill Podoprigora2024-07-151-1/+1
| | | | | | | | (GH-121768) (cherry picked from commit 178e44de8f023be7a5dc400044ab61983b191f24) Co-authored-by: Gregor <36135323+gege-hoho@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.13] gh-118297: Make Sure All Pending Calls Run in ↵Miss Islington (bot)2024-07-151-6/+28
| | | | | | | _Py_FinishPendingCalls() (gh-121806) (cherry picked from commit 985dd8e17b55ae35fc31546384fc9364f2f59f86, AKA gh-118298) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-121698 Emscripten: Use updated WebAssembly type reflection ↵Miss Islington (bot)2024-07-141-2/+12
| | | | | | | proposal (GH-121699) (GH-121745) (cherry picked from commit cae15267166e217822e3c58ac22b7817162f323a) Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
* [3.13] gh-121332: Make AST node constructor check _attributes instead of ↵Jelle Zijlstra2024-07-111-14/+25
| | | | | hardcoding attributes (GH-121334) (#121625) (cherry picked from commit 58e8cf2bb61f82df9eabd1209fe5e3d146e4c8cd)