Matt Wozniski
a94c7528b5
gh-132859: Run debugger scripts in their own namespaces ( #132860 )
...
Run debugger scripts in their own namespaces
Previously scripts injected by `sys.remote_exec` were run with the
globals of the `__main__` module. Instead, run each injected script
with an empty set of globals. If someone really wants to use the
`__main__` module's namespace, they can always `import __main__`.
2025-04-23 23:40:24 +00:00
Victor Stinner
402dba2928
gh-127604: Replace dprintf() with _Py_write_noraise() ( #132854 )
2025-04-23 20:02:25 +00:00
Pablo Galindo Salgado
99b13775da
gh-131591: Check for remote debug in PyErr_CheckSignals ( #132853 )
...
For the same reasons as running the GC, this will allow sections that
run in native code for long periods without executing bytecode to also
run the remote debugger protocol without having to wait until bytecode
is executed
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2025-04-23 20:59:41 +01:00
Serhiy Storchaka
4b4b9fbb06
gh-83994, gh-132843: Fix and improve test_ioctl (GH-132848)
...
* Skip test_ioctl_tcflush if termios.TCFLSH is not available.
* Do not skip ALL ioctl() tests when /dev/tty is not available.
2025-04-23 21:45:55 +03:00
Victor Stinner
e2c69d36d1
gh-132719: Skip multiprocessing test if missing ctypes ( #132846 )
...
Skip test_rlock_locked_2processes() if multiprocessing.sharedctypes
is missing (need ctypes).
2025-04-23 20:33:15 +02:00
Pablo Galindo Salgado
1007aab133
gh-127604: Allow faulthandler to dumpC stack on MacOS ( #132841 )
2025-04-23 18:23:24 +01:00
Łukasz Langa
c9bc458d30
gh-91048: Add ability to list all pending asyncio tasks in a process remotely ( #132807 )
2025-04-23 18:22:29 +01:00
Victor Stinner
926ff69f3f
gh-132825: Fix typo in dict_unhashable_type() name ( #132847 )
2025-04-23 18:54:13 +02:00
Victor Stinner
426449d983
gh-132825: Enhance unhashable error messages for dict and set ( #132828 )
2025-04-23 17:10:09 +02:00
Victor Stinner
b2e666f30a
gh-132719: Skip multiprocessing test if missing ctypes ( #132842 )
...
Skip test_lock_locked_2processes() if multiprocessing.sharedctypes is
missing (need ctypes).
2025-04-23 14:36:25 +00:00
Victor Stinner
1aaca7ab48
gh-127604: Fix refleak in faulthandler_dump_c_stack_py() ( #132840 )
2025-04-23 14:29:31 +00:00
Victor Stinner
dc3e9638c2
gh-132713: Fix typing.Union[index] race condition ( #132802 )
...
Add union_init_parameters() helper function. Use a critical section
to initialize the 'parameters' member.
2025-04-23 15:45:42 +02:00
Pablo Galindo Salgado
32c4bbe834
gh-132449: Improve the algorithm to detect typos in keywords ( #132837 )
2025-04-23 14:45:18 +01:00
Sergey B Kirpichev
85f89cb3e6
gh-121249: adjust formatting codes for complex types in struct/ctypes ( #132827 )
...
* F - for float _Complex
* D - for double _Complex
* G - for long double _Complex (not supported by the struct module)
2025-04-23 15:38:24 +02:00
Pablo Galindo Salgado
41dec4158d
gh-132449: Add whatsnew entry for typos in keywords ( #132838 )
2025-04-23 14:27:53 +01:00
Serhiy Storchaka
5f50541ebd
gh-132742: Update documentation for the fcntl module (GH-132765)
2025-04-23 14:27:21 +03:00
Serhiy Storchaka
d7be26a71e
gh-132734: Fix build on FreeBSD and old Linux (GH-132829)
2025-04-23 14:08:30 +03:00
Ken Jin
6430c634da
gh-132758: Fix tail call and pystats builds (GH-132759)
2025-04-23 18:17:35 +08:00
Victor Stinner
de9deb7ca7
gh-132713: Simplify list_repr_impl() ( #132811 )
2025-04-23 08:59:30 +02:00
pulkin
77605fa3bb
gh-131913: multiprocessing: add interrupt for POSIX (GH-132453)
...
* multiprocessing: interrupt
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>
2025-04-22 23:55:24 -07:00
John
862fd89036
gh-109981: Resolve situation on iOS regarding fd_count. ( #132823 )
...
Modifies the test helper that counts the list of open file descriptors to use
the optimised ``/dev/fd`` approach on all Apple platforms, not just macOS. This
avoids crashes caused by guarded file descriptors.
2025-04-23 03:22:57 +00:00
Eric Snow
b5bf8c80a9
gh-132776: Minor Fixes for XIBufferViewType (gh-132779)
...
This change covers the following:
* dealloc: no cleanup if no buffer set
* dealloc: handle already-destroyed interpreter correctly
* handle errors in _memoryview_from_xid() correctly
* clean up the buffer if the xidata is never used
2025-04-22 17:37:20 -06:00
Victor Stinner
a4ea80d523
gh-132713: Fix repr(list) race condition ( #132801 )
...
Hold a strong reference to the item while calling repr(item).
2025-04-22 22:09:35 +02:00
Jelle Zijlstra
722c501dba
CODEOWNERS: add myself to unionobject.c ( #132808 )
2025-04-22 21:32:22 +03:00
Tomas R.
a6a3dbb7db
GH-131798: JIT: Split CALL_TYPE_1 into several uops (GH-132419)
2025-04-22 09:30:38 -07:00
sobolevn
87b1ea016b
Update pre-commit
repos ( #132792 )
2025-04-22 18:32:19 +03:00
dura0ok
3b4b56f46d
gh-132470: Prevent crash in ctypes.CField when byte_size
is incorrect ( #132475 )
...
Fix: Prevent crash in ctypes.CField when byte_size does not match type size (gh-132470)
When creating a ctypes.CField with an incorrect byte_size (e.g., using `byte_size=2` for `ctypes.c_byte`), the code would previously abort due to the failed assertion `byte_size == info->size`.
This commit replaces the assertion with a proper error handling mechanism that raises a `ValueError` when `byte_size` does not match the expected type size. This prevents the crash and provides a more informative error message to the us
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-04-22 16:13:00 +03:00
Chris Eibl
f663b2c56a
GH-131296: Avoid invalid signed char comparison in getpath.c assertion (GH-131594)
2025-04-22 14:06:30 +01:00
Sergey B Kirpichev
79f7c67bf6
gh-128813: hide mixed-mode functions for complex arithmetic from C-API ( #131703 )
2025-04-22 14:18:18 +02:00
Stan Ulbrych
5ffb89420c
gh-46236: Add Py_UNICODE_REPLACEMENT_CHARACTER doc ( #132706 )
...
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-04-22 14:16:51 +02:00
Serhiy Storchaka
e84624450d
gh-132734: Add new constants for Bluetooth sockets (GH-132735)
2025-04-22 11:02:13 +00:00
RUANG (James Roy)
05d0559db0
gh-46236: Add PyUnicode_Resize() doc ( #132628 )
...
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-04-22 11:39:04 +02:00
Sergey B Kirpichev
d0660a9a40
gh-101410: Customize error messages for 1-arg math functions ( #129497 )
...
This also reverts loghelper() change in 75f59bb629 for integer
input. The error message shouldn't include argument value here.
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-04-22 11:29:20 +02:00
Pablo Galindo Salgado
bf3a0a1c0f
gh-132449: Improve syntax error messages for keywords with typos ( #132450 )
...
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-04-22 11:01:55 +02:00
mpage
3cfab449ab
gh-132578: Rename the threading.Thread._handle
field ( #132696 )
...
Commit `0e9c364f` introduced the `_handle` field on instances of
`threading.Thread`. Unfortunately it's fairly common for subclasses
of `threading.Thread` to define a `_handle()` method, which is shadowed
by the new field.
2025-04-21 16:07:54 -07:00
Sebastian Rittau
2b47f46d7d
gh-122179: Fix hashlib.file_digest and non-blocking I/O (GH-122183)
...
* Fix hashlib.file_digest and non-blocking I/O
* Add documentation around this behavior
* Add versionchanged
2025-04-21 14:15:05 -07:00
Peter Bierma
fa70bf8593
gh-132747: Fix NULL
dereference when calling a method's __get__
manually ( #132772 )
2025-04-21 14:09:34 -07:00
Duprat
c8e0b6e684
gh-132719: Fix AMD64 FreeBSD14/15 3.x failures - test_rlock_locked_2processes
used an unknown Value
(GH-132774)
...
* Fix creation of resvariable
2025-04-21 13:59:15 -07:00
Jelle Zijlstra
01317bb449
gh-132479: Fix crash with multiple comprehensions in annotations ( #132778 )
2025-04-21 13:49:59 -07:00
Stan Ulbrych
08e331d05e
PR 132638 typo fix ( #132785 )
...
Update remote_debugging.rst
2025-04-21 20:33:19 +00:00
ivonastojanovic
2b1dac6039
gh-131591: Add remote debugging attachment protocol documentation ( #132638 )
...
Add a developer-facing document describing the protocol used by
remote_exec(pid, script) to execute Python code in a running process.
This is intended to guide debugger and tool authors in reimplementing
the protocol.
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2025-04-21 20:18:24 +00:00
Sam Gross
da53660f35
gh-131586: Avoid refcount contention in context managers (gh-131851)
...
This avoid reference count contention in the free threading build
when calling special methods like `__enter__` and `__exit__`.
2025-04-21 15:54:25 -04:00
Peter Bierma
8dfa840773
gh-127604: Add C stack dumps to faulthandler
( #128159 )
2025-04-21 20:48:02 +01:00
sobolevn
ea8ec95cfa
gh-132769: Refactor possible read-out-of-bounds in lexer.c
( #132770 )
2025-04-21 18:48:48 +01:00
Kumar Aditya
8516343d3a
gh-127945: add test_ctypes
to free-threading TSAN CI ( #132727 )
2025-04-21 22:56:56 +05:30
Brandt Bucher
4f7f72ce34
GH-130415: Improve the JIT's unneeded uop removal pass (GH-132333)
2025-04-21 09:58:55 -07:00
Eric Snow
9be3645688
gh-132777: Fix Error Message for Duplicates in generate_global_scripts.py (gh-132780)
...
The fstring would actually raise a KeyError, which we fix. We also adjust the text to be correct.
2025-04-21 16:58:10 +00:00
Steve Dower
09b624b80f
gh-132639: Adds PyLong_AsNativeBytes, PyLong_FromNativeBytes and PyLong_FromUnsignedNativeBytes to the limited API (GH-132640)
2025-04-21 15:59:03 +01:00
Jelle Zijlstra
70b322d313
annotations: Add tests to check that async comprehensions produce errors ( #132513 )
...
This already works correctly but I forgot to test for it.
2025-04-21 07:06:33 -07:00
Саша Черных
132b6bc98f
gh-132054: Add `application/yaml
to
mimetypes
` ( #132056 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-21 12:05:37 +03:00