| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
| |
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
|
|
| |
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
|
|
|
|
|
| |
Optimize unicode_decode_utf8_writer()
Take the ascii_decode() fast-path even if dest is not aligned on
size_t bytes.
|
|
|
|
| |
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| |
|
|
|
|
| |
alternative (#119958)
|
|
|
|
| |
Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Explicit list of what it does that is different from
"just return __annotations__"
- Remove reference to PEP 563; adding the future import doesn't
do anything to type aliases, and in general it will never make
get_type_hints() less likely to fail.
- Remove example, as the Annotated docs already have a similar
example, and it's unbalanced to have one example about this
one edge case but not about other behaviors of the function.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
| |
The GIL may be disabled concurrently with this call so we need to use a
relaxed atomic load.
|
|
|
|
|
|
|
|
| |
Remove the delegation of `int` to the `__trunc__` special method: `int` will now only delegate to `__int__` and `__index__` (in that order). `__trunc__` continues to exist, but its sole purpose is to support `math.trunc`.
---------
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PEP 667's description of the planned changes to PyEval_GetLocals
was internally inconsistent when accepted, so the docs added for
gh-74929 didn't match either the current behaviour or the intended
behaviour once gh-118934 is fixed.
This PR updates the documentation and 3.13 What's New to match the
intended behaviour (once gh-118934 is fixed).
It also tidies up lingering references to `f_locals` always being a
dictionary (this hasn't been true since at least when custom
namespace support for class statement execution was added)
|
| |
|
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
| |
Implement `shutil._rmtree_safe_fd()` using a list as a stack to avoid emitting recursion errors on deeply nested trees.
`shutil._rmtree_unsafe()` was fixed in a150679f90.
|
| |
|
|
|
| |
Seen in CI occasionally when running `test_weakref`.
|
|
|
|
| |
that the given socket is in non-blocking mode (#119519)
|
| |
|
|
|
|
| |
Due to a limitation in TSAN, all reads from `PyThreadState.state` must be
atomic to avoid reported races.
|
|
|
|
|
| |
Only call `gc_restore_tid()` from stop-the-world contexts.
`worklist_pop()` can be called while other threads are running, so use a
relaxed atomic to modify `ob_tid`.
|
| |
|
|
|
|
| |
70.0.0.20240524 in /Tools (#119899)
|
|
|
|
|
|
| |
* Clarify impact on default behaviour of exec, eval, etc
* Update documentation for changes to PyEval_GetLocals (gh-74929)
Closes gh-11888
|
|
|
|
|
|
|
|
| |
* Add docs for new APIs
* Add soft-deprecation notices
* Add What's New porting entries
* Update comments referencing `PyFrame_LocalsToFast()` to mention the proxy instead
* Other related cleanups found when looking for refs to the deprecated APIs
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Support non-dict globals in LOAD_FROM_DICT_OR_GLOBALS
The implementation basically copies LOAD_GLOBAL. Possibly it could be deduplicated,
but that seems like it may get hairy since the two operations have different operands.
This is important to fix in 3.14 for PEP 649, but it's a bug in earlier versions too,
and we should backport to 3.13 and 3.12 if possible.
|
| |
|
| |
|
|
|
|
| |
The free-threaded refleak builds were reporting negative refcount deltas
in some tests because of a missing `_Py_NewRefWithLock`.
|
| |
|
|
|
| |
Reported by Michael Kass on docs@
|
|
|
|
| |
field. (#119364)
|
|
|
|
|
|
|
| |
Release the GIL before calling `_Py_qsbr_unregister`.
The deadlock could occur when the GIL was enabled at runtime. The
`_Py_qsbr_unregister` call might block while holding the GIL because the
thread state was not active, but the GIL was still held.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
`PyThreadState_Clear()` (#119753)
Make sure that `gilstate_counter` is not zero in when calling
`PyThreadState_Clear()`. A destructor called from `PyThreadState_Clear()` may
call back into `PyGILState_Ensure()` and `PyGILState_Release()`. If
`gilstate_counter` is zero, it will try to create a new thread state before
the current active thread state is destroyed, leading to an assertion failure
or crash.
|
| |
|
|
|
|
| |
Don't attempt to load pyrepl Windows console if platforms others than
Windows. For example, the import can fail if ctypes is missing.
|
|
|
|
| |
(GH-119834)
|
| |
|
|
|
|
|
|
| |
When using the ** operator or pow() with Fraction as the base
and an exponent that is not rational, a float, or a complex, the
fraction is no longer converted to a float.
|
|
|
|
| |
- auto-indent when editing multi-line block
- ignore comments
|
|
|
|
|
|
| |
Some of standard Tcl types were renamed, removed, or no longer
registered in Tcl 8.7/9.0. This change fixes automatic conversion of Tcl
values to Python values to avoid returning a Tcl_Obj where the primary
Python types (int, bool, str, bytes) were returned in older Tcl.
|
|
|
| |
Mismatches were just output to the stdout, without making the test failing.
|
|
|
|
|
| |
Improvements to WASM browser REPL.
Adds a text box to write and run code outside the REPL, a stop button, and handling of Ctrl-D for EOF.
|
|
|
|
| |
Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
| |
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|