summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-128008: Add `PyWeakref_IsDead()` (GH-128009)Sam Gross2024-12-195-0/+41
| | | | | | | | | The `PyWeakref_IsDead()` function tests if a weak reference is dead without any side effects. Although you can also detect if a weak reference is dead using `PyWeakref_GetRef()`, that function returns a strong reference that must be `Py_DECREF()`'d, which can introduce side effects if the last reference is concurrently dropped (at least in the free threading build).
* gh-127951: Add build option to enable pystats on Windows (GH-127952)Pieter Eendebak2024-12-193-1/+7
|
* gh-128083: Fix macro redefinition warning in clinic. (GH-127950)Peter Bierma2024-12-194-2/+131
|
* gh-127688: Add `SCHED_DEADLINE` and `SCHED_NORMAL` constants to `os` module ↵RUANG (James Roy)2024-12-197-1/+38
| | | | (GH-127689)
* gh-122706: fix docs for asyncio ssl sockets (#128092)Kumar Aditya2024-12-191-2/+2
|
* gh-128013: fix data race in `PyUnicode_AsUTF8AndSize` on free-threading ↵Kumar Aditya2024-12-192-18/+51
| | | | (#128021)
* gh-128069: brew link --overwrite tcl-tk@8 to prevent conflict with GitHub ↵Victor Stinner2024-12-191-1/+1
| | | | | | | image's version (#128090) brew link --overwrite tcl-tk@8 to prevent conflict with GitHub image's version Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-115999: Enable BINARY_SUBSCR_GETITEM for free-threaded build (gh-127737)Donghee Na2024-12-1912-62/+118
|
* gh-128013: Convert unicodeobject.c macros to functions (#128061)Victor Stinner2024-12-181-45/+78
| | | | | | | Convert unicodeobject.c macros to static inline functions. * Add _PyUnicode_SET_UTF8() and _PyUnicode_SET_UTF8_LENGTH() macros. * Add PyUnicode_HASH() and PyUnicode_SET_HASH() macros. * Remove unused _PyUnicode_KIND() and _PyUnicode_GET_LENGTH() macros.
* gh-128033: change `PyMutex_LockFast` to take `PyMutex` as argument (#128054)Kumar Aditya2024-12-183-5/+6
| | | Change `PyMutex_LockFast` to take `PyMutex` as argument.
* gh-121621: clear running loop early in asyncio (#128004)Kumar Aditya2024-12-181-0/+5
|
* gh-127949: deprecate `asyncio.get_event_loop_policy` (#128053)Kumar Aditya2024-12-189-26/+40
| | | This deprecates `asyncio.get_event_loop_policy` and will be removed in Python 3.16.
* gh-126639: Add ResourceWarning to NamedTemporaryFile (#126677)Thomas Grainger2024-12-183-6/+30
| | | Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-126742: add NEWS entry for fix of localized error messages (GH-128025)Bénédikt Tran2024-12-181-0/+3
|
* gh-126742: Avoid checking for library filename in test_ctypes (#128034)Bénédikt Tran2024-12-181-12/+5
| | | Avoid checking for library filename in `dlerror()` error messages of test_ctypes.
* gh-127174: add docs for asyncio.get_event_loop replacements (#127640)Thomas Grainger2024-12-181-0/+90
| | | Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-127897: fix HACL* build on macOS/Catalina (GH-127932)aeiouaeiouaeiouaeiouaeiouaeiou2024-12-183-5/+27
| | | | | | | gh-127897: Update HACL* module from upstream sources to get: - Lib_Memzero0.c: don't use memset_s() on macOS <10.9 - Use _mm_malloc() for KRML_ALIGNED_MALLOC on macOS <10.15 - Add LEGACY_MACOS macros, use _mm_free() for KRML_ALIGNED_FREE on macOS <10.15
* gh-127949: deprecate `asyncio.set_event_loop_policy` (#128024)Kumar Aditya2024-12-1846-67/+81
| | | | First step towards deprecating the asyncio policy system. This deprecates `asyncio.set_event_loop_policy` and will be removed in Python 3.16.
* gh-127060: Disable traceback colors in IDLE (#128028)Victor Stinner2024-12-182-1/+5
| | | | | Set TERM environment variable to "dumb" to disable traceback colors in IDLE, since IDLE doesn't understand ANSI escape sequences.
* gh-127146: Emscripten Include compiler version in _PYTHON_HOST_PLATFORM ↵Hood Chatham2024-12-172-0/+6
| | | | | | | (#127992) Modifies _PYTHON_HOST_PLATFORM to include the compiler version under Emscripten. The Emscripten compiler version is the platform version compatibility identifier.
* Merge branch 'main' of https://github.com/python/cpythonHugo van Kemenade2024-12-1712-68/+175
|\
| * gh-126742: Add _PyErr_SetLocaleString, use it for gdbm & dlerror messages ↵Bénédikt Tran2024-12-1712-68/+175
| | | | | | | | | | | | | | | | (GH-126746) - Add a helper to set an error from locale-encoded `char*` - Use the helper for gdbm & dlerror messages Co-authored-by: Victor Stinner <vstinner@python.org>
* | Post 3.14.0a3Hugo van Kemenade2024-12-171-1/+1
| |
* | Python 3.14.0a3v3.14.0a3Hugo van Kemenade2024-12-17120-279/+1200
|/
* gh-127085: Add a test skip if multiprocessing isn't available (#128019)Russell Keith-Magee2024-12-171-1/+4
| | | Add a test skip if multiprocessing isn't available.
* gh-127146: Emscripten clean up test suite (#127984)Hood Chatham2024-12-1712-82/+19
| | | Removed test skips that are no longer required as a result of Emscripten updates.
* Free arena on _PyCompile_AstOptimize failure in Py_CompileStringObject ↵Berker Peksag2024-12-161-0/+1
| | | | | | (GH-127910) After commit 10a91d7e9 introduced arena cleanup, commit 2dfbd4f36 removed the free call when _PyCompile_AstOptimize fails.
* gh-126907: make `atexit` thread safe in free-threading (#127935)Peter Bierma2024-12-164-88/+126
| | | | Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-127085: fix some data races in memoryview in free-threading (#127412)Edward Xu2024-12-163-8/+52
|
* Revert "gh-127586: properly restore blocked signals in resource_tracker.py ↵Hugo van Kemenade2024-12-163-22/+3
| | | | | (GH-127587)" (#127983) This reverts commit 46006a1b355f75d06c10e7b8086912c483b34487.
* Fix typo in itertools docs (gh-127995)Gugubo2024-12-161-1/+1
|
* gh-127864: Fix compiler warning (-Wstringop-truncation) (GH-127878)Tomas R.2024-12-161-2/+3
|
* gh-127896: Add missing documentation of `PySequence_In` (GH-127979)Yuki Kobayashi2024-12-163-0/+15
| | | | Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* gh-111178: fix UBSan failures in `_elementtree.c` (#127982)Bénédikt Tran2024-12-161-53/+80
|
* gh-125588: Allow to regenerate the parser with Python < 3.12 (#127969)Pablo Galindo Salgado2024-12-152-3/+9
| | | Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
* GH-126985: Don't override venv detection with PYTHONHOME (#127968)Filipe Laíns 🇵🇸2024-12-152-3/+38
|
* gh-127586: properly restore blocked signals in resource_tracker.py (GH-127587)Stephen Hansen2024-12-153-3/+22
| | | | | | | | | | | | | | * Correct pthread_sigmask in resource_tracker to restore old signals Using SIG_UNBLOCK to remove blocked "ignored signals" may accidentally cause side effects if the calling parent already had said signals blocked to begin with and did not intend to unblock them when creating a pool. Use SIG_SETMASK instead with the previous mask of blocked signals to restore the original blocked set. * Adding resource_tracker blocked signals test Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-119786: Fix miscellaneous typos in ↵Stan Ulbrych2024-12-151-3/+3
| | | | `InternalDocs/interpreter_definition.md` (#127957)
* getpath: Add comments highlighing details of the pyvenv.cfg detection (#127966)Filipe Laíns 🇵🇸2024-12-151-0/+11
|
* gh-127599: Fix _Py_RefcntAdd missing calls to ↵Ed Nutting2024-12-153-0/+13
| | | | | | | | _Py_INCREF_STAT_INC/_Py_INCREF_IMMORTAL_STAT_INC (#127717) Previously, `_Py_RefcntAdd` hasn't called `_Py_INCREF_STAT_INC/_Py_INCREF_IMMORTAL_STAT_INC` which is incorrect. Now it has been fixed.
* Clarify ast docs to use a less confusing example for `ast.ParamSpec` (#127955)Steve C2024-12-151-2/+2
| | | Fix typo in ast docs: ParamSpec defaults
* gh-127353: Allow to force color output on Windows V2 (#127926)Andrey Efremov2024-12-143-38/+51
|
* gh-127852: add remark about ',' separator (#127854)Sergey B Kirpichev2024-12-141-1/+3
| | | | | | | | | Specify that it is valid for floats and ints with 'd' presentation and an error otherwise. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Fix typo in docstring: quadruple double quotes (#127913)Totosuki2024-12-141-1/+1
|
* gh-127747: Resolve BytesWarning in test.support.strace_helper (#127849)Cody Maloney2024-12-141-4/+5
| | | | | | | | | | | | | | | | | | | | | The strace_helper code has a _make_error function to simplify making StraceResult objects in error cases. That takes a details parameter which is either a caught OSError or `bytes`. If it's bytes, _make_error would implicitly coerce that to a str inside of a f-string, resulting in a BytesWarning. It's useful to see if it's an OSError or bytes when debugging, resolve by changing to format with repr(). This is an error message on an internal helper. A non-zero exit code occurs if the strace binary isn't found, and no events will be parsed in that case (there is no output). Handle that case by checking exit code before checking for events. Still asserting around events rather than returning false, so that hopefully if there's some change to `strace` that breaks the parsing, will see that as a test failure rather than silently loosing strace tests because they are auto-disabled.
* gh-115999: Specialize loading attributes from modules in free-threaded ↵mpage2024-12-1315-179/+437
| | | | | | | | | builds (#127711) We use the same approach that was used for specialization of LOAD_GLOBAL in free-threaded builds: _CHECK_ATTR_MODULE is renamed to _CHECK_ATTR_MODULE_PUSH_KEYS; it pushes the keys object for the following _LOAD_ATTR_MODULE_FROM_KEYS (nee _LOAD_ATTR_MODULE). This arrangement avoids having to recheck the keys version. _LOAD_ATTR_MODULE is renamed to _LOAD_ATTR_MODULE_FROM_KEYS; it loads the value from the keys object pushed by the preceding _CHECK_ATTR_MODULE_PUSH_KEYS at the cached index.
* Minor readability improvements for the itertools recipes (gh-127928)Raymond Hettinger2024-12-131-39/+35
|
* gh-126024: unicodeobject: optimize find_first_nonascii (GH-127790)Inada Naoki2024-12-131-9/+14
| | | Remove 1 branch.
* gh-127691: add type checks when using `PyUnicodeError` objects (GH-127694)Bénédikt Tran2024-12-133-68/+157
|
* gh-102471, PEP 757: Add PyLong import and export API (#121339)Victor Stinner2024-12-139-0/+576
| | | | | Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> Co-authored-by: Steve Dower <steve.dower@microsoft.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>