summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-85287: Change codecs to raise precise UnicodeEncodeError and ↵John Sloboda2024-03-179-81/+306
| | | | | UnicodeDecodeError (#113674) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* Update titles and subtitles on landing page template (#116914)Carol Willing2024-03-171-31/+31
| | | | | | | | | * Update titles and subtitles on landing page template * address review from gvanrossum * Edits from hugovk review * Change word order back. Down the road we should split license and history
* gh-116809: Restore removed _PyErr_ChainExceptions1() function (#116900)Victor Stinner2024-03-163-3/+6
|
* CI: Process stale issues four times per day (#116857)Hugo van Kemenade2024-03-161-1/+1
|
* gh-116879: Add new optimizer pystats to tables (GH-116880)Michael Droettboom2024-03-161-4/+30
|
* gh-112536: Add more TSAN tests (#116896)Donghee Na2024-03-161-0/+2
| | | | | --------- Co-authored-by: Antoine Pitrou <antoine@python.org>
* gh-116851: Remove "from ctypes import *" from a ctypes example (GH-116852)jnchen2024-03-161-1/+0
| | | | It is confusing, because libc is not imported from ctypes, but defined in previous examples, which already contain the import.
* gh-114271: Fix race in `Thread.join()` (#114839)mpage2024-03-1612-639/+767
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a race between when `Thread._tstate_lock` is released[^1] in `Thread._wait_for_tstate_lock()` and when `Thread._stop()` asserts[^2] that it is unlocked. Consider the following execution involving threads A, B, and C: 1. A starts. 2. B joins A, blocking on its `_tstate_lock`. 3. C joins A, blocking on its `_tstate_lock`. 4. A finishes and releases its `_tstate_lock`. 5. B acquires A's `_tstate_lock` in `_wait_for_tstate_lock()`, releases it, but is swapped out before calling `_stop()`. 6. C is scheduled, acquires A's `_tstate_lock` in `_wait_for_tstate_lock()` but is swapped out before releasing it. 7. B is scheduled, calls `_stop()`, which asserts that A's `_tstate_lock` is not held. However, C holds it, so the assertion fails. The race can be reproduced[^3] by inserting sleeps at the appropriate points in the threading code. To do so, run the `repro_join_race.py` from the linked repo. There are two main parts to this PR: 1. `_tstate_lock` is replaced with an event that is attached to `PyThreadState`. The event is set by the runtime prior to the thread being cleared (in the same place that `_tstate_lock` was released). `Thread.join()` blocks waiting for the event to be set. 2. `_PyInterpreterState_WaitForThreads()` provides the ability to wait for all non-daemon threads to exit. To do so, an `is_daemon` predicate was added to `PyThreadState`. This field is set each time a thread is created. `threading._shutdown()` now calls into `_PyInterpreterState_WaitForThreads()` instead of waiting on `_tstate_lock`s. [^1]: https://github.com/python/cpython/blob/441affc9e7f419ef0b68f734505fa2f79fe653c7/Lib/threading.py#L1201 [^2]: https://github.com/python/cpython/blob/441affc9e7f419ef0b68f734505fa2f79fe653c7/Lib/threading.py#L1115 [^3]: https://github.com/mpage/cpython/commit/81946532792f938cd6f6ab4c4ff92a4edf61314f --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Antoine Pitrou <antoine@python.org>
* gh-112536: Add test_threading to TSAN tests (#116898)Antoine Pitrou2024-03-163-10/+19
|
* gh-116484: Fix collisions between Checkbutton and ttk.Checkbutton default ↵Serhiy Storchaka2024-03-163-2/+30
| | | | | | | | names (GH-116495) Change automatically generated tkinter.Checkbutton widget names to avoid collisions with automatically generated tkinter.ttk.Checkbutton widget names within the same parent widget.
* gh-116764: Fix regressions in urllib.parse.parse_qsl() (GH-116801)Serhiy Storchaka2024-03-163-1/+33
| | | | | | | | * Restore support of None and other false values. * Raise TypeError for non-zero integers and non-empty sequences. The regressions were introduced in gh-74668 (bdba8ef42b15e651dc23374a08143cc2b4c4657d).
* gh-90535: Fix support of interval>1 in logging.TimedRotatingFileHandler ↵Serhiy Storchaka2024-03-163-35/+173
| | | | | | | (GH-116220) Fix support of interval values > 1 in logging.TimedRotatingFileHandler for when='MIDNIGHT' and when='Wx'.
* gh-112536: Add TSAN builds on Github Actions (#116872)Donghee Na2024-03-166-0/+93
|
* gh-116858: Add `@cpython_only` to several tests in `test_cmd_line` (#116859)Nikita Sobolev2024-03-161-0/+10
|
* Minor kde() docstring nit: make presentation order match the function ↵Raymond Hettinger2024-03-151-1/+1
| | | | signature (#116876)
* GH-115802: Reduce the size of _INIT_CALL_PY_EXACT_ARGS. (GH-116856)Mark Shannon2024-03-153-72/+54
|
* gh-116868: Avoid locking in PyType_IsSubtype (#116829)Dino Viehland2024-03-151-32/+48
| | | Make PyType_IsSubType not acquire lock
* gh-112536: Add --tsan test for reasonable TSAN execution times. (gh-116601)Donghee Na2024-03-155-0/+39
|
* gh-116782: Mention `__type_params__` in `inspect.getmembers` docs (#116783)Nikita Sobolev2024-03-151-0/+10
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-116621: Specialize list.extend for dict keys/values (gh-116816)Donghee Na2024-03-151-0/+37
|
* gh-116735: Use `MISSING` for `CALL` event if argument is absent (GH-116737)Tian Gao2024-03-154-3/+7
|
* gh-63283: IDNA prefix should be case insensitive (GH-17726)Zackery Spytz2024-03-153-3/+12
| | | | | | | | Any capitalization of "xn--" should be acceptable for the ACE prefix (see https://tools.ietf.org/html/rfc3490#section-5). Co-authored-by: Pepijn de Vos <pepijndevos@gmail.com> Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-111926: Simplify proxy creation logic (#116844)mpage2024-03-151-16/+3
| | | | | Since 3.12, allocating a GC-able object cannot trigger GC. This allows us to simplify the logic for creating the canonical callback-less proxy object.
* gh-111926: Simplify weakref creation logic (#116843)mpage2024-03-151-15/+5
| | | | | Since 3.12, allocating a GC object cannot immediately trigger GC. This allows us to simplify the logic for creating the canonical callback-less weakref.
* GH-116422: Modify a few uops so that they can be supported by tier 2 with ↵Mark Shannon2024-03-154-55/+52
| | | | hot/cold splitting (GH-116832)
* gh-90095: Ignore empty lines and comments in `.pdbrc` (#116834)Tian Gao2024-03-154-2/+26
|
* gh-85283: Build pwd extension with the limited C API (#116841)Victor Stinner2024-03-155-12/+16
| | | | Argument Clinic now uses the PEP 737 "%T" format to format type name for the limited C API.
* gh-116842: Improve test comment and fix a doctest (gh-116846)Raymond Hettinger2024-03-151-2/+2
|
* GH-113838: Add "Comparison to os.path" section to pathlib docs (#115926)Barney Gale2024-03-151-19/+44
|
* gh-116195: Implements a fast path for nt.getppid (GH-116205)vxiiduu2024-03-142-2/+85
| | | | | Use the NtQueryInformationProcess system call to efficiently retrieve the parent process ID in a single step, rather than using the process snapshots API which retrieves large amounts of unnecessary information and is more prone to failure (since it makes heap allocations). Includes a fallback to the original win32_getppid implementation in case the unstable API appears to return strange results.
* gh-111696, PEP 737: Add %T and %N to PyUnicode_FromFormat() (#116839)Victor Stinner2024-03-147-2/+135
|
* gh-116811: Ensure MetadataPathFinder.invalidate_caches is reachable when ↵Jason R. Coombs2024-03-143-0/+6
| | | | | | | | | delegated through PathFinder. (#116812) * Make MetadataPathFinder a proper classmethod. * In PathFinder.invalidate_caches, also invoke MetadataPathFinder.invalidate_caches. * Add blurb
* gh-106531: Refresh zipfile._path with zipp 3.18. (#116835)Jason R. Coombs2024-03-145-54/+159
| | | | | * gh-106531: Refresh zipfile._path with zipp 3.18. * Add blurb
* Minor improvements to the itertools documentation (gh-116833)Raymond Hettinger2024-03-141-84/+94
|
* gh-111696, PEP 737: Add PyType_GetModuleName() function (#116824)Victor Stinner2024-03-1415-27/+48
| | | Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* gh-113317, AC: Add libclinic.converter module (#116821)Victor Stinner2024-03-144-601/+621
| | | | | * Move CConverter class to a new libclinic.converter module. * Move CRenderData and Include classes to a new libclinic.crenderdata module.
* gh-112795: Move the test for ZipFile into the core tests for zipfile. (#116823)Jason R. Coombs2024-03-142-12/+11
| | | Move the test for ZipFile into the core tests for zipfile.
* GH-116422: Factor out eval breaker checks at end of calls into its own ↵Mark Shannon2024-03-147-371/+474
| | | | micro-op. (GH-116817)
* gh-111696, PEP 737: Add PyType_GetFullyQualifiedName() function (#116815)Victor Stinner2024-03-1411-91/+158
| | | Rewrite tests on type names in Python, they were written in C.
* gh-113317, AC: Add libclinic.block_parser module (#116819)Victor Stinner2024-03-143-336/+361
| | | | | | * Move Block and BlockParser classes to a new libclinic.block_parser module. * Move Language and PythonLanguage classes to a new libclinic.language module.
* gh-116731: libregrtest: Clear inspect & importlib.metadata caches in ↵Petr Viktorin2024-03-141-0/+9
| | | | | clear_caches (GH-116805) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* gh-88494: Use QueryPerformanceCounter() for time.monotonic() (#116781)Victor Stinner2024-03-144-138/+110
| | | | | On Windows, time.monotonic() now uses the QueryPerformanceCounter() clock to have a resolution better than 1 us, instead of the gGetTickCount64() clock which has a resolution of 15.6 ms.
* CI: Only test free-threading with faster macOS M1 (#116814)Hugo van Kemenade2024-03-142-4/+8
| | | Only test free-threading with faster macOS M1
* gh-113317, AC: Add libclinic.function (#116807)Victor Stinner2024-03-144-241/+270
| | | | | | Move Module, Class, Function and Parameter classes to a new libclinic.function module. Move VersionTuple and Sentinels to libclinic.utils.
* gh-116646, AC: Always use PyObject_AsFileDescriptor() in fildes (#116806)Victor Stinner2024-03-144-48/+74
| | | | | | | The fildes converter of Argument Clinic now always call PyObject_AsFileDescriptor(), not only for the limited C API. The _PyLong_FileDescriptor_Converter() converter stays as a fallback when PyObject_AsFileDescriptor() cannot be used.
* gh-116646, AC: Add CConverter.use_converter() method (#116793)Victor Stinner2024-03-142-8/+36
| | | Only add includes when the converter is effectively used.
* gh-85283: Build fcntl extension with the limited C API (#116791)Victor Stinner2024-03-144-26/+48
|
* gh-116780: Fix `test_inspect` in `-OO` mode (#116788)Nikita Sobolev2024-03-141-0/+5
|
* gh-90300: Fix undocumented envvars in the Python CLI help (GH-116765)Serhiy Storchaka2024-03-141-0/+3
|
* gh-113308: Remove some internal parts of `uuid` module (#115934)Nikita Sobolev2024-03-143-22/+14
| | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>