summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* gh-127906: Test the limited C API in test_cppext (#127916)Victor Stinner2024-12-134-3/+26
|
* gh-127870: Detect recursive calls in ctypes _as_parameter_ handling (#127872)Victor Stinner2024-12-133-3/+33
|
* GH-126833: Dumps graphviz representation of executor graph. (GH-126880)Mark Shannon2024-12-139-2/+230
|
* gh-126868: Add freelist for compact int objects (GH-126865)Pieter Eendebak2024-12-138-55/+102
|
* GH-125174: Don't use `UINT32_MAX` in header file (GH-127863)Mark Shannon2024-12-131-1/+1
|
* link to the correct output method in documentation (#127857)Viktor Kálmán2024-12-131-1/+1
|
* Document PyObject_SelfIter (#127861)Miro Hrončok2024-12-132-0/+9
|
* gh-127845: Minor improvements to iOS test runner script (#127846)Russell Keith-Magee2024-12-123-20/+53
| | | | | | Uses symlinks to install iOS framework into testbed clone, adds a verbose mode to the iOS runner to hide most Xcode output, adds another mechanism to disable terminal colors, and ensures that stdout is flushed after every write.
* Fix typo in traceback docs (#127884)Daniel Haag2024-12-121-1/+1
|
* GH-127724: don't use sysconfig to calculate the venv local include path ↵Filipe Laíns 🇵🇸2024-12-121-3/+12
| | | | (#127731)
* Revert "gh-127353: Allow to force color output on Windows (#127354)" (#127889)Hugo van Kemenade2024-12-123-48/+8
| | | This reverts commit 365451e28368db46ae89a3a990d85c10c2284aa2.
* Fix typos in `Lib/_pydecimal.py` (#127700)Stan Ulbrych2024-12-121-2/+2
|
* gh-127353: Allow to force color output on Windows (#127354)Andrey Efremov2024-12-123-8/+48
|
* gh-127865: Fix build failure for systems without thread local support ↵velemas2024-12-122-4/+5
| | | | | | (GH-127866) This PR fixes the build issue introduced by the commit 628f6eb from GH-112207 on systems without thread local support.
* gh-127879: Fix data race in `_PyFreeList_Push` (#127880)Sam Gross2024-12-121-1/+1
| | | | | Writes to the `ob_tid` field need to use atomics because it may be concurrently read by a non-locking dictionary, list, or structmember read.
* GH-127807: pathlib ABCs: remove `PathBase._unsupported_msg()` (#127855)Barney Gale2024-12-125-44/+52
| | | | | This method helped us customise the `UnsupportedOperation` message depending on the type. But we're aiming to make `PathBase` a proper ABC soon, so `NotImplementedError` is the right exception to raise there.
* GH-125174: Fix compiler warning (GH-127860)Mark Shannon2024-12-121-1/+1
| | | Fix compiler warning
* GH-127381: pathlib ABCs: remove remaining uncommon `PathBase` methods (#127714)Barney Gale2024-12-123-67/+27
| | | | | | | | | | | | | | | | | | Remove the following methods from `pathlib._abc.PathBase`: - `expanduser()` - `hardlink_to()` - `touch()` - `chmod()` - `lchmod()` - `owner()` - `group()` - `from_uri()` - `as_uri()` These operations aren't regularly supported in virtual filesystems, so they don't win a place in the `PathBase` interface. (Some of them probably don't deserve a place in `Path` :P.) They're quasi-abstract (except `lchmod()`), and they're not called by other `PathBase` methods.
* Simplify and speed-up an itertools recipe (gh-127848)Raymond Hettinger2024-12-121-6/+6
|
* gh-127740: Add some more tests for earlier PR #127756 (#127818)Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి)2024-12-121-0/+4
|
* gh-127146: Some expected failures in Emscripten time tests (#127843)Hood Chatham2024-12-122-7/+25
| | | | Disables two tests in the test_time suite, and adjusts test_os to reflect precision limits in Emscripten.
* gh-115999: Specialize `CALL_KW` in free-threaded builds (#127713)mpage2024-12-114-35/+26
| | | | | | | | | | | | | * Enable specialization of CALL_KW * Fix bug pushing frame in _PY_FRAME_KW `_PY_FRAME_KW` pushes a pointer to the new frame onto the stack for consumption by the next uop. When pushing the frame fails, we do not want to push the result, `NULL`, to the stack because it is not a valid stackref. This works in the default build because `PyStackRef_NULL` and `NULL` are the same value, so the `PyStackRef_XCLOSE()` in the error handler ignores it. In the free-threaded build the values are not the same; `PyStackRef_XCLOSE()` will attempt to decref a null pointer.
* gh-111609: Test `end_offset` in SyntaxError subclass (#127830)Nice Zombies2024-12-111-0/+15
| | | Test `end_offset` in SyntaxError subclass
* GH-125174: Mark objects as statically allocated. (#127797)Mark Shannon2024-12-117-13/+99
| | | | | * Set a bit in the unused part of the refcount on 64 bit machines and the free-threaded build. * Use the top of the refcount range on 32 bit machines
* gh-118915: C API: Document frame locals proxies. (#127720)Peter Bierma2024-12-111-1/+21
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-127065: Make methodcaller thread-safe and re-entrant (GH-127746)Pieter Eendebak2024-12-114-96/+131
| | | | | | | | | | | The function `operator.methodcaller` was not thread-safe since the additional of the vectorcall method in gh-89013. In the free threading build the issue is easy to trigger, for the normal build harder. This makes the `methodcaller` safe by: * Replacing the lazy initialization with initialization in the constructor. * Using a stack allocated space for the vectorcall arguments and falling back to `tp_call` for calls with more than 8 arguments.
* GH-127058: Make `PySequence_Tuple` safer and probably faster. (#127758)Mark Shannon2024-12-115-48/+88
| | | | * Use a small buffer, then list when constructing a tuple from an arbitrary sequence.
* gh-123401: Fix http.cookies module to support obsolete RFC 850 date format ↵Nano2024-12-113-2/+53
| | | | | | | (#123405) Co-authored-by: Wulian <1055917385@qq.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* CI: Use bash to properly expand variable (#127822)Hugo van Kemenade2024-12-111-1/+2
|
* gh-126992: Change pickle code to base 10 for load_long and load_int (GH-127042)Justin Applegate2024-12-115-9/+64
| | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-127791: Fix, document, and test `PyUnstable_AtExit` (#127793)Peter Bierma2024-12-117-39/+71
|