Commit Graph

122923 Commits

Author SHA1 Message Date
Kumar Aditya
48042c52a6
fix outdated comments in asyncio (#121783) 2024-07-15 05:59:19 +00:00
Jelle Zijlstra
50eec501fe
gh-57141: Make shallow argument to filecmp.dircmp keyword-only (#121767)
It is our general practice to make new optional parameters keyword-only,
even if the existing parameters are all positional-or-keyword. Passing
this parameter as positional would look confusing and could be error-prone
if additional parameters are added in the future.
2024-07-14 15:53:32 -07:00
Sviatoslav Sydorenko (Святослав Сидоренко)
7982363b47
Generalize reusable Windows CI jobs (#121766) 2024-07-14 15:22:35 -06:00
Samuel Thibault
d005f2c186
gh-121731: Fix mimalloc compile error on GNU/Hurd (#121732) 2024-07-14 12:50:25 -04:00
Ken Jin
5d6861ad06
gh-121621: Use PyMutex for writes to asyncio state (#121622)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2024-07-14 12:22:56 +00:00
sobolevn
bb802db8cf
gh-121660: Fix ga_getitem by explicitly checking for NULL result (#121661) 2024-07-14 14:20:40 +03:00
Sviatoslav Sydorenko (Святослав Сидоренко)
6505bda85a
Fix cache restoration for Hypothesis CI job (#121756) 2024-07-14 05:00:32 -06:00
Dominic H
26dfb27712
gh-121749: Fix discrepancy in docs for PyModule_AddObjectRef (GH-121750) 2024-07-14 10:11:10 +00:00
Hood Chatham
cae1526716
gh-121698 Emscripten: Use updated WebAssembly type reflection proposal (GH-121699) 2024-07-14 11:25:09 +02:00
Hood Chatham
3086b86cfd
gh-121700 Emscripten trampolines not quite right since #106219 (GH-121701) 2024-07-14 11:24:09 +02:00
Bruno Lima
04130b290b
gh-121562: optimized hex_from_char (#121563)
Performance improvement to `float.fromhex`: use a lookup table
for computing the hexadecimal value of a character, in place of the
previous switch-case construct. Patch by Bruno Lima.
2024-07-14 10:05:35 +01:00
Jan Musílek
f6f4022a35
gh-64308: Remove TestProgram from the unittest docs (GH-121675) 2024-07-14 10:57:12 +02:00
Tomas R
901ea411bf
gh-121708: Improve test coverage for unittest.util (GH-121713) 2024-07-14 10:08:47 +02:00
Victor Stinner
a2bec77d25
gh-120642: Move _PyCode_CODE() to the internal C API (#121644)
Move _PyCode_CODE() and _PyCode_NBYTES() macros to the internal C API
since they use _Py_CODEUNIT which is only part of the internal C API.
2024-07-13 23:07:49 +02:00
Ulrik Södergren
b5805892d5
gh-73159 Added clarifications in multiprocessing docs on that objects are pickled. (GH-121686)
Added explicit comments about that objects are pickled when transmitted via multiprocessing queues and pipes.
2024-07-13 13:07:40 -07:00
Tian Gao
c0af6d4ff1
gh-121651: Fix pdb header test (#121724) 2024-07-13 11:55:22 -07:00
Sam Gross
a640a605a8
gh-121652: Handle allocate_weakref returning NULL (#121653)
The `allocate_weakref` may return NULL when out of memory. We need to
handle that case and propagate the error.
2024-07-13 12:07:52 -04:00
Milan Oberkirch
a183474293
gh-121711: Set -m asyncio return_code to 1 for ENOTTY (#121714)
Set return_code to 1 for ENOTTY
2024-07-13 17:17:24 +02:00
Gregor
178e44de8f
gh-121657: Display correct error message for yield from outside of a function (GH-121680)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-13 17:14:39 +02:00
Bénédikt Tran
f4d6e45c1e
gh-120452: improve documentation about private name mangling (#120451)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-07-13 07:45:18 -07:00
mirelagrigoras
422855ad21
gh-120823: Fix doc for ftplib.FTP.retrbinary() (GH-121697)
Co-authored-by: Mirela Andreea GRIGORAS <magrigoras@bitdefender.com>
2024-07-13 16:16:26 +02:00
Sam Gross
abc3aeebdb
gh-121605: Increase timeout in test_pyrepl.run_repl (#121606)
We also need to close the `slave_fd` earlier so that reading from
`master_fd` won't block forever when the subprocess finishes.
2024-07-13 15:54:28 +02:00
Tomas R
0a26aa5007
gh-121671: Increase test coverage of ast.get_docstring (GH-121674)
Increase test coverage for `ast.get_docstring`
2024-07-13 14:59:15 +02:00
Timon Viola
fc21781175
gh-96765: Update ConfigParser.read() docs with multi-file read example (#121664)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-13 12:47:05 +00:00
Pablo Galindo Salgado
4b9e10d0ea
gh-121499: Fix multi-line history rendering in the REPL (#121531)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2024-07-13 12:54:10 +02:00
Marta Gómez Macías
e745996b2d
gh-121609: Fix pasting of characters containing unicode character joiner (#121667) 2024-07-13 10:44:18 +00:00
Serhiy Storchaka
18015451d0
gh-121153: Fix some errors with use of _PyLong_CompactValue() (GH-121154)
* The result has type Py_ssize_t, not intptr_t.
* Type cast between unsigned and signdet integer types should be explicit.
* Downcasting should be explicit.
* Fix integer overflow check in sum().
2024-07-13 13:40:44 +03:00
Bas Bloemsaat
0759cecd9d
gh-99242 Ignore error when running regression tests under certain conditions. (GH-121663)
Co-Authored-By: Kevin Diem <kg.diem@gmail.com>
2024-07-13 11:52:08 +02:00
Pablo Galindo Salgado
4e36dd7d87
gh-121497: Make Pyrepl respect correctly the history with input hook set (#121498) 2024-07-13 09:42:14 +00:00
Zachary Ware
dc03ce797a
gh-95144: Improve error message of ... in None (GH-119888) 2024-07-12 16:34:17 +00:00
Savannah Ostrowski
65fededf9c
Update retroactive comments from GH-117741 (segfault in FutureIter_dealloc) (GH-121638)
Address comments
2024-07-12 10:34:30 +02:00
Sam Gross
e8c91d90ba
gh-121103: Put free-threaded libraries in lib/python3.14t (#121293)
On POSIX systems, excluding macOS framework installs, the lib directory
for the free-threaded build now includes a "t" suffix to avoid conflicts
with a co-located default build installation.
2024-07-11 16:21:37 -04:00
Eric Snow
5250a03133
gh-117482: Fix Builtin Types Slot Wrappers (gh-121602)
When builtin static types are initialized for a subinterpreter, various "tp" slots have already been inherited (for the main interpreter).  This was interfering with the logic in add_operators() (in Objects/typeobject.c), causing a wrapper to get created when it shouldn't.  This change fixes that by preserving the original data from the static type struct and checking that.
2024-07-11 20:20:14 +00:00
Jelle Zijlstra
58e8cf2bb6
gh-121332: Make AST node constructor check _attributes instead of hardcoding attributes (#121334) 2024-07-11 14:34:53 +00:00
Sam Gross
44937d11a6
gh-121592: Make select.poll() and related objects thread-safe (#121594)
This makes select.poll() and kqueue() objects thread-safe in the
free-threaded build. Note that calling close() concurrently with other
functions is still not thread-safe due to races on file descriptors
(gh-121544).
2024-07-11 10:21:09 -04:00
sobolevn
e6264b44dc
gh-121615: Improve module.rst C-API docs with better error descriptions (#121616) 2024-07-11 11:57:22 +03:00
Tian Gao
690b9355e0
gh-121450: Make inline breakpoints use the most recent pdb instance (#121451) 2024-07-10 19:54:27 -07:00
Irit Katriel
6557af6698
gh-121554: remove unnecessary internal functions in compile.c (#121555)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-07-10 23:48:37 +01:00
Irit Katriel
ef10110cd7
gh-119786: fix broken links in docs and comment (#121601) 2024-07-10 21:59:14 +00:00
Eric Snow
35a67e36aa
gh-121596: Fix Sharing Interpreter Channels (gh-121597)
This fixes a mistake in gh-113012 and adds a test that verifies the fix.
2024-07-10 21:31:09 +00:00
Sam Gross
7641743d48
gh-117657: Remove TSAN suppressions for _abc.c (#121508)
The functions look thread-safe and I haven't seen any warnings issued
when running the tests locally.
2024-07-10 17:08:10 -04:00
Sam Gross
3ec719fabf
gh-117657: Fix TSan race in _PyDict_CheckConsistency (#121551)
The only remaining race in dictobject.c was in _PyDict_CheckConsistency
when the dictionary has shared keys.
2024-07-10 14:04:12 -04:00
Ken Jin
3bfc9c831a
gh-120198: Stop the world when setting __class__ on free-threaded build (GH-120672) 2024-07-11 02:02:08 +08:00
Stefano Rivera
a802277914
gh-121460: Skip freeing unallocated arenas (gh-121491)
`munmap(NULL)` is not noop, like `free(NULL)` is.

Fixes an observed testsuite hang on 32-bit ARM systems.
2024-07-10 10:40:55 -06:00
Irit Katriel
0177a34335
gh-121404: remove some accesses to compiler internals from codegen functions (#121538) 2024-07-10 17:09:45 +01:00
Sam Gross
af9f6de6ea
gh-107851: Fix spurious failures in fcntl eintr tests (#121556)
On heavily loaded machines, the subprocess may finish its sleep before
the parent process manages to synchronize with it via a failed lock.

This leads to errors like:

  Exception: failed to sync child in 300.3 sec

Use pipes instead to mutually synchronize between parent and child.
2024-07-10 10:36:52 -04:00
Victor Stinner
ca0fb3423c
gh-89364: Export PySignal_SetWakeupFd() function (#121537)
Export the PySignal_SetWakeupFd() function. Previously, the function
was documented but it couldn't be used in 3rd party code.
2024-07-10 15:47:08 +02:00
sobolevn
84a5597b08
gh-121567: Improve slice C-API docs by mentioning exceptions (#121568)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-07-10 13:56:44 +03:00
Irit Katriel
cced22c760
gh-121547: deduplicate the code of const_cache update functions (#121548) 2024-07-10 10:34:54 +00:00
sobolevn
e2822360da
gh-121571: Do not use EnvironmentError in tests, use OSError instead (#121572) 2024-07-10 13:11:46 +03:00