| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
* Passing a string as the "real" keyword argument is now an error;
it should only be passed as a single positional argument.
* Passing a complex number as the "real" or "imag" argument is now deprecated;
it should only be passed as a single positional argument.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove the equivalence with real+imag*1j which can be incorrect in corner
cases (non-finite numbers, the sign of zeroes).
* Separately document the three roles of the constructor: parsing a string,
converting a number, and constructing a complex from components.
* Document positional-only parameters of complex(), float(), int() and bool()
as positional-only.
* Add examples for complex() and int().
* Specify the grammar of the string for complex().
* Improve the grammar of the string for float().
* Describe more explicitly the behavior when real and/or imag arguments are
complex numbers. (This will be deprecated in future.)
|
|
|
|
|
| |
For example, the free-threaded build now generates
`lib/pkgconfig/python-3.13t.pc` and the debug build generates
`lib/pkgconfig/python-3.13d.pc`.
|
|
|
|
|
|
|
|
|
|
| |
* Share common classes.
* Use exactly representable floats and exact tests.
* Check the sign of zero components.
* Remove duplicated tests (mostly left after merging int and long).
* Reorder tests in more consistent way.
* Test more error messages.
* Add tests for missed cases.
|
|
|
|
| |
PhotoImage.get() retruns a string instead of a 3-tuple of integers
in this case.
|
| |
|
| |
|
|
|
| |
It is used by the pywin32 project.
|
|
|
| |
Signed-off-by: Bradley Reynolds <bradley.reynolds@darbia.dev>
|
| |
|
|
|
|
|
|
|
|
| |
they stay there (GH-119731)
The Full Grammar specification in the docs omits rule actions, so grammar rules that raise a syntax error looked like valid syntax.
This was solved in ef940de by hiding those rules in the custom syntax highlighter.
This moves all syntax-error alternatives to invalid rules, adds a validator that ensures that actions containing RAISE_SYNTAX_ERROR are in invalid rules, and reverts the syntax highlighter hack.
|
|
|
|
| |
Follow-up to 3c890b50. Ensure we `os.close()` open file descriptors when
the `os.fwalk()` generator is finalized.
|
|
|
|
| |
Implement `os.fwalk()` using a list as a stack to avoid emitting recursion
errors on deeply nested trees.
|
|
|
|
|
| |
GH-25416 accidentally replaced a reference to the *stderr* argument of
`subprocess.run` with a reference to the *stdin* argument. *stdin* is
not affected by the `check_output` option.
|
|
|
|
|
|
| |
For silly reasons, pathlib's generic implementation of `walk()` currently
resides in `glob._Globber`. This commit moves it into
`pathlib._abc.PathBase.walk()` where it really belongs, and makes
`pathlib.Path.walk()` call `os.walk()`.
|
|
|
|
|
|
|
|
|
|
|
| |
(#119634)
Make `shutil._rmtree_unsafe()` call `os.walk()`, which is implemented
without recursion.
`shutil._rmtree_safe_fd()` is not affected and can still raise a recursion
error.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
The deadlock only affected the free-threaded build and only occurred
when the GIL was enabled at runtime. The `Py_DECREF(old_name)` call
might temporarily release the GIL while holding the type seqlock.
Another thread may spin trying to acquire the seqlock while holding the
GIL.
The deadlock occurred roughly 1 in ~1,000 runs of `pool_in_threads.py`
from `test_multiprocessing_pool_circular_import`.
|
|
|
|
| |
(GH-119426)
|
|
|
|
|
|
| |
If one calls pow(fractions.Fraction, x, module) with modulo not None, the error message now says that the types are incompatible rather than saying pow only takes 2 arguments. Implemented by having fractions.Fraction __pow__ accept optional modulo argument and return NotImplemented if not None. pow() then raises with appropriate message.
---------
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
|
|
|
|
|
| |
Tests (#119480)
Co-authored-by: Carl Meyer <carl@oddbird.net>
|
|
|
|
| |
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
|
|
|
|
|
|
| |
* gh-118673: Remove shebang and executable bits from stdlib modules.
* Removed shebangs and exe bits on turtledemo scripts.
The setting was inappropriate for '__main__' and inconsistent across the other modules. The scripts can still be executed directly by invoking with the desired interpreter.
|