summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-128083: Fix macro redefinition warning in clinic. (GH-127950)Peter Bierma2024-12-191-0/+69
|
* gh-128013: fix data race in `PyUnicode_AsUTF8AndSize` on free-threading ↵Kumar Aditya2024-12-191-1/+19
| | | | (#128021)
* gh-115999: Enable BINARY_SUBSCR_GETITEM for free-threaded build (gh-127737)Donghee Na2024-12-191-1/+18
|
* gh-127949: deprecate `asyncio.get_event_loop_policy` (#128053)Kumar Aditya2024-12-187-25/+35
| | | 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-182-6/+29
| | | Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* 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-127949: deprecate `asyncio.set_event_loop_policy` (#128024)Kumar Aditya2024-12-1845-67/+77
| | | | 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-181-1/+3
| | | | | Set TERM environment variable to "dumb" to disable traceback colors in IDLE, since IDLE doesn't understand ANSI escape sequences.
* Merge branch 'main' of https://github.com/python/cpythonHugo van Kemenade2024-12-172-15/+86
|\
| * gh-126742: Add _PyErr_SetLocaleString, use it for gdbm & dlerror messages ↵Bénédikt Tran2024-12-172-15/+86
| | | | | | | | | | | | | | | | (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>
* | Python 3.14.0a3v3.14.0a3Hugo van Kemenade2024-12-171-20/+37
|/
* 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.
* gh-126907: make `atexit` thread safe in free-threading (#127935)Peter Bierma2024-12-161-1/+34
| | | | 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-161-1/+25
|
* Revert "gh-127586: properly restore blocked signals in resource_tracker.py ↵Hugo van Kemenade2024-12-162-19/+3
| | | | | (GH-127587)" (#127983) This reverts commit 46006a1b355f75d06c10e7b8086912c483b34487.
* GH-126985: Don't override venv detection with PYTHONHOME (#127968)Filipe Laíns 🇵🇸2024-12-151-0/+31
|
* gh-127586: properly restore blocked signals in resource_tracker.py (GH-127587)Stephen Hansen2024-12-152-3/+19
| | | | | | | | | | | | | | * 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-127353: Allow to force color output on Windows V2 (#127926)Andrey Efremov2024-12-142-38/+49
|
* 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-133-10/+113
| | | | | | | | | 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.
* gh-102471, PEP 757: Add PyLong import and export API (#121339)Victor Stinner2024-12-131-0/+91
| | | | | 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-133-3/+25
|
* gh-127870: Detect recursive calls in ctypes _as_parameter_ handling (#127872)Victor Stinner2024-12-131-2/+10
|
* 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-122-46/+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-122-8/+46
|
* 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-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.
* 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-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-112-1/+17
| | | | | * 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-127065: Make methodcaller thread-safe and re-entrant (GH-127746)Pieter Eendebak2024-12-112-0/+46
| | | | | | | | | | | 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-111-0/+25
| | | | * 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-112-2/+50
| | | | | | | (#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>
* gh-126992: Change pickle code to base 10 for load_long and load_int (GH-127042)Justin Applegate2024-12-113-2/+59
| | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-127740: For odd-length input to bytes.fromhex(...) change the error ↵Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి)2024-12-111-0/+6
| | | | message to ValueError: fromhex() arg must be of even length (#127756)
* GH-127381: pathlib ABCs: remove `PathBase.samefile()` and rarer `is_*()` ↵Barney Gale2024-12-114-171/+141
| | | | | | | | | | (#127709) Remove `PathBase.samefile()`, which is fairly specific to the local FS, and relies on `stat()`, which we're aiming to remove from `PathBase`. Also remove `PathBase.is_mount()`, `is_junction()`, `is_block_device()`, `is_char_device()`, `is_fifo()` and `is_socket()`. These rely on POSIX file type numbers that we're aiming to remove from the `PathBase` API.
* gh-59705: Set OS thread name when Thread.name is changed (#127702)Victor Stinner2024-12-102-5/+30
| | | Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-126937: ctypes: fix TypeError when a field's size is >65535 bytes (GH-126938)Melissa0x1f9922024-12-101-0/+23
| | | | | Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-126491: Revert "GH-126491: Lower heap size limit with faster marking ↵Petr Viktorin2024-12-101-3/+11
| | | | | | | | (GH-127519)" (GH-127770) Revert "GH-126491: Lower heap size limit with faster marking (GH-127519)" This reverts commit 023b7d2141467017abc27de864f3f44677768cb3, which introduced a refleak.
* gh-125420: implement `Sequence.count` API on `memoryview` objects (#125443)Bénédikt Tran2024-12-101-0/+28
|
* add help blurb for "extralargefile" (#127710)Skip Montanaro2024-12-101-20/+22
|
* gh-127718: Add colour to `test.regrtest` output (#127719)Hugo van Kemenade2024-12-105-53/+163
|
* gh-126775: make linecache.checkcache threadsafe and GC re-entrency safe ↵Thomas Grainger2024-12-101-5/+8
| | | | | | | (#126776) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Bartosz Sławecki <bartoszpiotrslawecki@gmail.com>
* gh-127651: Use __file__ in diagnostics if origin is missing (#127660)Shantanu2024-12-101-2/+46
| | | | | | | See the left hand side in https://github.com/python/cpython/pull/123929/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59deL2840-L2849 --------- Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-125420: implement `Sequence.index` API on `memoryview` objects (#125446)Bénédikt Tran2024-12-101-0/+26
|