mpage
001b21d1c5
gh-111926: Simplify weakref creation logic ( #116843 )
...
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.
2024-03-15 09:56:13 -04:00
Mark Shannon
2cf18a4430
GH-116422: Modify a few uops so that they can be supported by tier 2 with hot/cold splitting (GH-116832)
2024-03-15 10:48:00 +00:00
Tian Gao
a50cf6c3d7
gh-90095: Ignore empty lines and comments in `.pdbrc` ( #116834 )
2024-03-15 09:36:04 +00:00
Victor Stinner
8fc8fbb43a
gh-85283: Build pwd extension with the limited C API ( #116841 )
...
Argument Clinic now uses the PEP 737 "%T" format to format type name
for the limited C API.
2024-03-15 08:49:58 +01:00
Raymond Hettinger
41e844a4ac
gh-116842: Improve test comment and fix a doctest (gh-116846)
2024-03-14 21:40:36 -05:00
Barney Gale
1904f0a224
GH-113838: Add "Comparison to os.path" section to pathlib docs ( #115926 )
2024-03-15 00:11:49 +00:00
vxiiduu
be1c808fca
gh-116195: Implements a fast path for nt.getppid (GH-116205)
...
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.
2024-03-14 23:09:36 +00:00
Victor Stinner
7bbb9b57e6
gh-111696, PEP 737: Add %T and %N to PyUnicode_FromFormat() ( #116839 )
2024-03-14 22:23:00 +00:00
Jason R. Coombs
5f52d20a93
gh-116811: Ensure MetadataPathFinder.invalidate_caches is reachable when delegated through PathFinder. ( #116812 )
...
* Make MetadataPathFinder a proper classmethod.
* In PathFinder.invalidate_caches, also invoke MetadataPathFinder.invalidate_caches.
* Add blurb
2024-03-14 17:59:00 -04:00
Jason R. Coombs
be59aaf3ab
gh-106531: Refresh zipfile._path with zipp 3.18. ( #116835 )
...
* gh-106531: Refresh zipfile._path with zipp 3.18.
* Add blurb
2024-03-14 21:53:50 +00:00
Raymond Hettinger
ab9e322ae1
Minor improvements to the itertools documentation (gh-116833)
2024-03-14 16:39:50 -05:00
Victor Stinner
c432df6d56
gh-111696, PEP 737: Add PyType_GetModuleName() function ( #116824 )
...
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2024-03-14 18:17:43 +00:00
Victor Stinner
25cd8730aa
gh-113317, AC: Add libclinic.converter module ( #116821 )
...
* Move CConverter class to a new libclinic.converter module.
* Move CRenderData and Include classes to a new libclinic.crenderdata
module.
2024-03-14 18:59:43 +01:00
Jason R. Coombs
fd8e30eb62
gh-112795: Move the test for ZipFile into the core tests for zipfile. ( #116823 )
...
Move the test for ZipFile into the core tests for zipfile.
2024-03-14 17:50:24 +00:00
Mark Shannon
61e54bfcee
GH-116422: Factor out eval breaker checks at end of calls into its own micro-op. (GH-116817)
2024-03-14 16:31:47 +00:00
Victor Stinner
19c3a2ff91
gh-111696, PEP 737: Add PyType_GetFullyQualifiedName() function ( #116815 )
...
Rewrite tests on type names in Python, they were written in C.
2024-03-14 16:19:36 +00:00
Victor Stinner
b54d7c87aa
gh-113317, AC: Add libclinic.block_parser module ( #116819 )
...
* Move Block and BlockParser classes to a new libclinic.block_parser
module.
* Move Language and PythonLanguage classes to a new
libclinic.language module.
2024-03-14 16:11:39 +00:00
Petr Viktorin
bae6579b46
gh-116731: libregrtest: Clear inspect & importlib.metadata caches in clear_caches (GH-116805)
...
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-03-14 16:47:12 +01:00
Victor Stinner
846ad5a26a
gh-88494: Use QueryPerformanceCounter() for time.monotonic() ( #116781 )
...
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.
2024-03-14 16:42:41 +01:00
Hugo van Kemenade
415cd06d72
CI: Only test free-threading with faster macOS M1 ( #116814 )
...
Only test free-threading with faster macOS M1
2024-03-14 15:10:56 +00:00
Victor Stinner
b1236a4410
gh-113317, AC: Add libclinic.function ( #116807 )
...
Move Module, Class, Function and Parameter classes to a new
libclinic.function module.
Move VersionTuple and Sentinels to libclinic.utils.
2024-03-14 14:37:22 +00:00
Victor Stinner
a76288ad9b
gh-116646, AC: Always use PyObject_AsFileDescriptor() in fildes ( #116806 )
...
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.
2024-03-14 14:58:07 +01:00
Victor Stinner
2a54c4b25e
gh-116646, AC: Add CConverter.use_converter() method ( #116793 )
...
Only add includes when the converter is effectively used.
2024-03-14 13:57:02 +01:00
Victor Stinner
97b80af897
gh-85283: Build fcntl extension with the limited C API ( #116791 )
2024-03-14 12:01:13 +00:00
Nikita Sobolev
f20dfb7569
gh-116780: Fix `test_inspect` in `-OO` mode ( #116788 )
2024-03-14 13:16:18 +03:00
Serhiy Storchaka
19ac28bd08
gh-90300: Fix undocumented envvars in the Python CLI help (GH-116765)
2024-03-14 12:09:19 +02:00
Nikita Sobolev
61f576a5ef
gh-113308: Remove some internal parts of `uuid` module ( #115934 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-14 13:01:41 +03:00
Nikita Sobolev
66fb613d90
gh-116785: Fix direct invocation of `test_inspect` ( #116787 )
2024-03-14 12:55:54 +03:00
Victor Stinner
d4028724f2
gh-116646: Add limited C API support to AC fildes converter ( #116769 )
...
Add tests on the "fildes" converter to _testclinic_limited.
2024-03-14 10:28:58 +01:00
Victor Stinner
a18c9854e8
gh-113317, AC: Move warn() and fail() to libclinic.errors ( #116770 )
2024-03-14 08:07:01 +00:00
Brett Cannon
3a25d9c5a9
GH-114736: Use WASI SDK 21 (GH-116771)
2024-03-14 01:45:33 +00:00
Brett Cannon
8c094c3095
GH-115983: skip building shared modules for testing under WASI (GH-116528)
2024-03-13 23:25:50 +00:00
Sergey B Kirpichev
e39795f2cb
Docs: PyUnstable_Long_IsCompact() docs now mention PyLong_AsNativeBytes() ( #116634 )
2024-03-14 00:01:13 +01:00
guangwu
7af4b9f253
Docs: fix spelling of the word 'transferring' ( #116641 )
2024-03-13 23:53:32 +01:00
Michael Droettboom
cef0ec1a3c
gh-116760: Fix pystats for trace attempts (GH-116761)
...
There are now at least two bytecodes that may attempt to optimize,
JUMP_BACK, and more recently, COLD_EXIT.
Only the JUMP_BACK was counting the attempt in the stats.
This moves that counter to uop_optimize itself so it should
always happen no matter where it is called from.
2024-03-13 22:13:33 +00:00
Serhiy Storchaka
8c6db45ce3
gh-90300: Document equivalent -X options for envvars in the Python CLI help (GH-116756)
2024-03-13 22:59:16 +02:00
Brett Cannon
61733a2fb9
GH-115979: update test_importlib to work under WASI SDK 21 (GH-116754)
2024-03-13 13:24:28 -07:00
Raymond Hettinger
5ff012a449
Better presentation order for recipes. (gh-116755)
2024-03-13 15:02:56 -05:00
Serhiy Storchaka
e54bdeab9c
gh-90300: Sort the -X options and some envvars in the Python CLI help (GH-116739)
2024-03-13 21:15:44 +02:00
Sam Gross
98ab21cce6
gh-116631: Fix race condition in `test_shutdown_immediate_put_join` ( #116670 )
...
The test case had a race condition: if `q.task_done()` was executed
after `shutdown(immediate=True)`, then it would raise an exception
because the immediate shutdown already emptied the queue. This happened
rarely with the GIL (due to the switching interval), but frequently in
the free-threaded build.
2024-03-13 14:56:28 -04:00
Nikita Sobolev
25684e7131
gh-100746: Improve `test_named_expressions.py` ( #116713 )
2024-03-13 21:12:40 +03:00
Nir Friedman
7f418fb111
gh-98731: Improvements to the logging documentation (GH-101618)
...
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2024-03-13 15:58:30 +00:00
Sam Gross
8e2aab7ad5
gh-116604: Fix test_gc on free-threaded build ( #116662 )
...
The free-threaded GC only does full collections, so it uses a threshold that
is a maximum of a fixed value (default 2000) and proportional to the number of
live objects. If there were many live objects after the previous collection,
then the threshold may be larger than 10,000 causing
`test_indirect_calls_with_gc_disabled` to fail.
This manually sets the threshold to `(1000, 0, 0)` for the test. The `0`
disables the proportional scaling.
2024-03-13 13:27:36 +00:00
Vinay Sajip
186af3cf21
[doc]: Update cookbook recipe for Qt6. (GH-116719)
2024-03-13 13:22:47 +00:00
Victor Stinner
612f1ec988
gh-110918: Fix side effects of regrtest test_match_tests() ( #116718 )
...
test_match_tests now saves and restores patterns.
Add get_match_tests() function to libregrtest.filter.
Previously, running test_regrtest multiple times in a row only ran
tests once: "./python -m test test_regrtest -R 3:3.
2024-03-13 14:20:33 +01:00
Serhiy Storchaka
33662d4e01
gh-90300: Fix cmdline.rst (GH-116721)
...
* Fix the description of the "-b" option.
* Add references to environment variables for "-s" and "-X dev" options.
2024-03-13 15:03:13 +02:00
Ken Jin
617aca9e74
gh-115419: Change default sym to not_null (GH-116562)
2024-03-13 20:57:48 +08:00
Nikita Sobolev
fcd49b4f47
gh-116714: Handle errors correctly in `PyFloat_GetInfo` ( #116715 )
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-13 12:38:03 +00:00
Serhiy Storchaka
aa7bcf284f
gh-116401: Fix blocking os.fwalk() and shutil.rmtree() on opening a named pipe (GH-116421)
2024-03-13 11:40:28 +02:00
Tian Gao
8332e85b2f
gh-116626: Emit `CALL` events for all `INSTRUMENTED_CALL_FUNCTION_EX` (GH-116627)
2024-03-13 08:28:01 +00:00