summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-126524: Run `regen-unicodedata` as a part of our CI (#126682)sobolevn2024-12-041-1/+1
|
* gh-127572: Fix `test_structmembers` initialization (GH-127577)Sam Gross2024-12-042-2/+2
| | | | | | | | gh-127572: Fix `test_structmembers` initialization. The 'C' format code expects an `int` as a destination (not a `char`). This led to test failures on big-endian platforms like s390x. Use the 'c' format code, which expects a `char` as the destination (but requires a Python byte objects instead of a str).
* Itertool recipe additions (gh-127483)Raymond Hettinger2024-12-041-0/+37
|
* gh-127146: Resolve some minor problems in Emscripten tests (#127565)Hood Chatham2024-12-043-4/+4
| | | | Adjusts some Emscripten test exclusions regarding strftime, fma, and stack depth.
* gh-112192: Increase the trace module coverage precision to one decimal (#126972)RUANG (James Roy)2024-12-034-7/+7
|
* gh-115999: Enable specialization of `CALL` instructions in free-threaded ↵mpage2024-12-0311-92/+220
| | | | | | | | | | | | | | | | | | | | | | builds (#127123) The CALL family of instructions were mostly thread-safe already and only required a small number of changes, which are documented below. A few changes were needed to make CALL_ALLOC_AND_ENTER_INIT thread-safe: Added _PyType_LookupRefAndVersion, which returns the type version corresponding to the returned ref. Added _PyType_CacheInitForSpecialization, which takes an init method and the corresponding type version and only populates the specialization cache if the current type version matches the supplied version. This prevents potentially caching a stale value in free-threaded builds if we race with an update to __init__. Only cache __init__ functions that are deferred in free-threaded builds. This ensures that the reference to __init__ that is stored in the specialization cache is valid if the type version guard in _CHECK_AND_ALLOCATE_OBJECT passes. Fix a bug in _CREATE_INIT_FRAME where the frame is pushed to the stack on failure. A few other miscellaneous changes were also needed: Use {LOCK,UNLOCK}_OBJECT in LIST_APPEND. This ensures that the list's per-object lock is held while we are appending to it. Add missing co_tlbc for _Py_InitCleanup. Stop/start the world around setting the eval frame hook. This allows us to read interp->eval_frame non-atomically and preserves the behavior of _CHECK_PEP_523 documented below.
* gh-127271: Replace use of PyCell_GET/SET (gh-127272)Neil Schemenauer2024-12-038-48/+231
| | | | | | | | | | | | | | | | | | * Replace uses of `PyCell_GET` and `PyCell_SET`. These macros are not safe to use in the free-threaded build. Use `PyCell_GetRef()` and `PyCell_SetTakeRef()` instead. * Since `PyCell_GetRef()` returns a strong rather than borrowed ref, some code restructuring was required, e.g. `frame_get_var()` returns a strong ref now. * Add critical sections to `PyCell_GET` and `PyCell_SET`. * Move critical_section.h earlier in the Python.h file. * Add `PyCell_GET` to the free-threading howto table of APIs that return borrowed refs. * Add additional unit tests for free-threading.
* gh-115999: Add free-threaded specialization for `SEND` (gh-127426)Neil Schemenauer2024-12-034-15/+50
| | | | | No additional thread safety changes are required. Note that sending to a generator that is shared between threads is currently not safe in the free-threaded build.
* gh-127421: Fix race in test_start_new_thread_failed (#127549)mpage2024-12-031-1/+2
| | | | | | | | | | | | | | Fix race in test_start_new_thread_failed When we succeed in starting a new thread, for example if setrlimit was ineffective, we must wait for the newly spawned thread to exit. Otherwise, we run the risk that the newly spawned thread will race with runtime finalization and access memory that has already been clobbered/freed. `_thread.start_new_thread()` only spawns daemon threads, which the runtime does not wait for at shutdown, and does not return a handle. Use `_thread.start_joinable_thread()` and join the resulting handle when the thread is started successfully.
* gh-115999: Specialize `LOAD_SUPER_ATTR` in free-threaded builds (gh-127128)Neil Schemenauer2024-12-036-21/+51
| | | | | | Use existing helpers to atomically modify the bytecode. Add unit tests to ensure specializing is happening as expected. Add test_specialize.py that can be used with ThreadSanitizer to detect data races. Fix thread safety issue with cell_set_contents().
* gh-127347: Document `traceback.print_list` (#127348)Tomas R.2024-12-034-3/+10
| | | Previously, `traceback.print_list` didn't have a documentation entry and was not exposed in `traceback.__all__`. Now it has a documentation entry and is exposed in `__all__`.
* gh-127255: Make `CopyComPointer` public and add to `ctypes` doc. (GH-127275)Jun Komoda2024-12-035-4/+26
|
* gh-117657: TSAN Fix races in `PyMember_Get` and `PyMember_Set` for C ↵Daniele Parmeggiani2024-12-0310-50/+735
| | | | extensions (GH-123211)
* gh-126585: Add EHWPOISON error code (#126586)RUANG (James Roy)2024-12-034-0/+16
|
* gh-127253: Note that Stable ABI is about ABI stability (GH-127254)Petr Viktorin2024-12-031-3/+11
|
* docs(logging): fix phrasing from "operation on" to "operate on" (#127543)Alexander Stepchenko2024-12-031-1/+1
|
* Speed-up lazy heapq import in collections (gh-127538)Raymond Hettinger2024-12-031-1/+6
|
* gh-127111: Emscripten Make web example work again (#127113)Hood Chatham2024-12-029-92/+175
| | | | | Moves the Emscripten web example into a standalone folder, and updates Makefile targets to build the web example. Instructions for usage have also been added.
* gh-127518: Fix pystats build after #127169 (#127526)Michael Droettboom2024-12-021-2/+3
| | | gh-127518: Fix pystats build after #127619
* gh-127521: Mark list as "shared" before resizing if necessary (#127524)Sam Gross2024-12-021-0/+20
| | | | | | | | | In the free threading build, if a non-owning thread resizes a list, it must use QSBR to free the old list array because there may be a concurrent access (without a lock) from the owning thread. To match the pattern in dictobject.c, we just mark the list as "shared" before resizing if it's from a non-owning thread and not already marked as shared.
* gh-127411: Fix invalid conversion of load of TLBC array when compiled in C++ ↵mpage2024-12-022-2/+9
| | | | | (#127466) Cast the result of the load to the correct type
* gh-126876: Fix test_socket.testLargeTimeout() for missing _testcapi (#127517)Victor Stinner2024-12-021-2/+8
|
* gh-115999: Use light-weight lock for UNPACK_SEQUENCE_LIST (gh-127514)Donghee Na2024-12-025-44/+14
|
* gh-101100: Fix Sphinx warnings about list methods (#127054)Yuki Kobayashi2024-12-023-8/+7
|
* gh-109523: Raise a BlockingIOError if reading text from a non-blocking ↵Giovanni Siragusa2024-12-027-1/+57
| | | | stream cannot immediately return bytes. (GH-122933)
* gh-126618: fix repr(itertools.count(sys.maxsize)) (#127048)Sergey B Kirpichev2024-12-023-6/+28
| | | Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-126890: Restore stripped `ssl` docstrings (GH-127281)Peter Bierma2024-12-022-14/+114
|
* Fix Unicode encode_wstr_utf8() (#127420)Victor Stinner2024-12-021-1/+1
| | | Raise RuntimeError instead of RuntimeWarning.
* GH-126491: GC: Mark objects reachable from roots before doing cycle ↵Mark Shannon2024-12-0214-103/+355
| | | | | | | | | | | | | collection (GH-127110) * Mark almost all reachable objects before doing collection phase * Add stats for objects marked * Visit new frames before each increment * Update docs * Clearer calculation of work to do.
* add missing gc_collect() calls in sqlite3 tests (#127446)CF Bolz-Tereick2024-12-021-0/+2
|
* gh-127443: Fix some entries in `Doc/data/refcounts.dat` (#127451)Bénédikt Tran2024-12-021-19/+21
| | | Fix incorrect entries in `Doc/data/refcounts.dat`
* GH-127429: fix sysconfig data generation on cross-builds (#127430)Filipe Laíns 🇵🇸2024-12-026-20/+49
|
* gh-115999: Add partial free-thread specialization for BINARY_SUBSCR (gh-127227)Donghee Na2024-12-0210-71/+128
|
* gh-126899: Add `**kw` to `tkinter.Misc.after` and `tkinter.Misc.after_idle` ↵Zhikang Yan2024-12-015-8/+31
| | | | | | | (#126900) --------- Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-119786: cleanup internal docs and fix internal links (#127485)Bénédikt Tran2024-12-0111-148/+152
|
* gh-127321: Avoid stopping at an opcode without an associated line number for ↵Tian Gao2024-12-013-0/+24
| | | | breakpoint() (#127457)
* gh-127356: Fix prepend doctrees directory for gettext target (#127357)Rafael Fontenelle2024-12-011-1/+1
|
* Add the missing `f` on an f-string error message in multiprocessing. (GH-127462)Gregory P. Smith2024-12-011-1/+1
|
* gh-127165: Disallow embedded NULL characters in `_interpreters` (#127199)Peter Bierma2024-12-012-0/+9
|
* GH-127381: pathlib ABCs: remove `PathBase.cwd()` and `home()` (#127427)Barney Gale2024-11-303-17/+17
| | | | | These classmethods presume that the user has retained the original `__init__()` signature, which may not be the case. Also, many virtual filesystems don't provide current or home directories.
* summarize: Fix typo in stats (#127450)alm2024-11-301-1/+1
|
* Docs: Fix incorrect indents in `c-api/type.rst` (#127449)Yuki Kobayashi2024-11-301-25/+23
|
* gh-127417: fix UTF-8 decoder optimization on AIX (#127433)Inada Naoki2024-11-301-10/+14
|
* gh-119786: improve internal docs on `co_linetable` (#123198)Bénédikt Tran2024-11-301-26/+61
|
* GH-127381: pathlib ABCs: remove `PathBase.lstat()` (#127382)Barney Gale2024-11-294-29/+26
| | | | | | Remove the `PathBase.lstat()` method, which is a trivial variation of `stat()`. No user-facing changes because the pathlib ABCs are still private.
* Link to correct class methods in asyncio primitives docs (#127270)Ollanta Cuba Gyllensten2024-11-291-4/+4
|
* gh-127316: fix incorrect assertion in setting `__class__` in free-threading ↵Kumar Aditya2024-11-292-1/+16
| | | | (#127399)
* gh-127208: Reject null character in _imp.create_dynamic() (#127400)Victor Stinner2024-11-292-3/+18
| | | | _imp.create_dynamic() now rejects embedded null characters in the path and in the module name.
* fix param type in PyObject_HasAttrWithError (docs) (#127403)biggus-developerus2024-11-291-1/+1
|
* gh-126024: optimize UTF-8 decoder for short non-ASCII string (#126025)Inada Naoki2024-11-292-45/+261
|