cpython
cpython copied to clipboard
The Python programming language
This PR optmizes `list.pop` Benchmark results ``` x=[1,2]; x.pop(0): Mean +- std dev: [m2] 81.8 ns +- 2.5 ns -> [pr_special] 68.9 ns +- 2.0 ns: 1.19x faster x=[1,2]; x.pop(1):...
Before python3.11, when in a venv the zip path is calculated from prefix. In python3.11 the behavior is accidentally changed to calculating from the default prefix. This change will break...
It's possible that this only happens when using `--with-pydebug`. (And perhaps only on Mac?) I get 8 of these: ``` /Users/guido/cpython/Lib/asyncio/base_events.py:703: ResourceWarning: unclosed event loop _warn(f"unclosed event loop {self!r}", ResourceWarning,...
* Issue: gh-94597
New methods are generally marked as "new in version X". For example, `pathlib.Path.is_relative_to` is marked as "new in version 3.9" : https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.is_relative_to  `pathlib.Path.absolute` was added in version 3.11, but...
We also move the closely related `max_module_number` and add comments documenting the group of struct members. * Issue: gh-81057
This has been broken for a long time (9 years). We do this by using spawn.get_preparation_data() and then using the values in that dictionary appropriately. This lets us also fix...
* Issue: gh-99205
* Issue: gh-93649
Also moves some asserts around to ensure we assert before using the things we're asserting * Issue: gh-99377