summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* build(deps-dev): bump types-setuptools from 69.5.0.20240423 to ↵dependabot[bot]2024-06-011-1/+1
| | | | 70.0.0.20240524 in /Tools (#119899)
* gh-118888: Further PEP 667 docs updates (gh-119893)Alyssa Coghlan2024-06-012-3/+44
| | | | | | * Clarify impact on default behaviour of exec, eval, etc * Update documentation for changes to PyEval_GetLocals (gh-74929) Closes gh-11888
* gh-74929: PEP 667 C API documentation (gh-119379)Alyssa Coghlan2024-06-019-11/+104
| | | | | | | | * 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
* statistics.fmean(): speed-up code path for non-sizeable inputs. (gh-119876)Raymond Hettinger2024-05-311-7/+5
|
* gh-119180: Lazily wrap annotations on classmethod and staticmethod (#119864)Jelle Zijlstra2024-05-313-3/+138
|
* gh-119821: Support non-dict globals in LOAD_FROM_DICT_OR_GLOBALS (#119822)Jelle Zijlstra2024-05-318-58/+76
| | | | | | | | | 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.
* gh-118894: Make asyncio REPL use pyrepl (GH-119433)Łukasz Langa2024-05-317-65/+143
|
* gh-119853: Add Include/refcount.h to projects (#119860)Victor Stinner2024-05-313-0/+5
|
* gh-119799: Add missing `_Py_IncRefTotal` to `_Py_NewRefWithLock` (#119800)Sam Gross2024-05-311-0/+3
| | | | The free-threaded refleak builds were reporting negative refcount deltas in some tests because of a missing `_Py_NewRefWithLock`.
* doc: Add glossary entry for "free threading" (#119865)Sam Gross2024-05-311-0/+6
|
* contextlib docs: Clean up redundant 'up' after 'cleanup' (GH-119867)Zachary Ware2024-05-311-1/+1
| | | Reported by Michael Kass on docs@
* gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions ↵Irit Katriel2024-05-311-1/+1
| | | | field. (#119364)
* gh-119369: Fix deadlock during thread exit in free-threaded build (#119528)Sam Gross2024-05-313-9/+19
| | | | | | | 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.
* gh-119770: Make termios ioctl() constants positive (#119840)Victor Stinner2024-05-314-18/+32
|
* gh-119585: Fix crash involving `PyGILState_Release()` and ↵Sam Gross2024-05-314-0/+36
| | | | | | | | | | `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.
* gh-119853: Add Include/refcount.h file (#119854)Victor Stinner2024-05-313-482/+501
|
* gh-111201: Skip pyrepl Windows tests earlier (#119848)Victor Stinner2024-05-311-2/+5
| | | | Don't attempt to load pyrepl Windows console if platforms others than Windows. For example, the import can fail if ctypes is missing.
* gh-111201: [pyrepl] Ensure optional platform-specific imports are optional ↵Łukasz Langa2024-05-311-12/+12
| | | | (GH-119834)
* gh-116145: Updated bundled Tcl/Tk on Windows to 8.6.14 (GH-117030)Steve Dower2024-05-314-12/+13
|
* gh-119189: Fix the power operator for Fraction (GH-119242)Joshua Herman2024-05-314-6/+12
| | | | | | 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.
* gh-111201: Improve pyrepl auto indentation (#119606)Arnon Yaari2024-05-313-11/+101
| | | | - auto-indent when editing multi-line block - ignore comments
* gh-103194: Fix Tkinter’s Tcl value type handling for Tcl 8.7/9.0 (GH-103846)Christopher Chavez2024-05-312-18/+36
| | | | | | 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.
* gh-119780: Adjust exception messages in Lib/test/test_format.py (GH-119781)Sergey B Kirpichev2024-05-311-6/+6
| | | Mismatches were just output to the stdout, without making the test failing.
* gh-97747: Improvements to WASM browser REPL. (#97665)Katie Bell2024-05-312-8/+69
| | | | | 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.
* gh-111201: Support pyrepl on Windows (#119559)Dino Viehland2024-05-3115-49/+1020
| | | | Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-119744: move a few functions from compile.c to flowgraph.c (#119745)Irit Katriel2024-05-305-157/+157
|
* gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322)James De Bias2024-05-302-9/+22
| | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-109218: Deprecate weird cases in the complex() constructor (GH-119620)Serhiy Storchaka2024-05-306-61/+164
| | | | | | | * 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.
* Docs: `shutil.rmtree`'s `onerror` has no pending removal version (#118947)Hugo van Kemenade2024-05-301-3/+3
|
* gh-109218: Improve documentation for the complex() constructor (GH-119687)Serhiy Storchaka2024-05-304-63/+135
| | | | | | | | | | | | | | * 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.)
* gh-119729: Use 't' in pkg-config file name for free-threaded build (#119738)Sam Gross2024-05-303-7/+16
| | | | | 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`.
* gh-109218: Refactor tests for the complex() constructor (GH-119635)Serhiy Storchaka2024-05-301-167/+195
| | | | | | | | | | * 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.
* gh-119791: Fix new Tkinter tests for wantobjects=0 (GH-119792)Serhiy Storchaka2024-05-301-3/+10
| | | | PhotoImage.get() retruns a string instead of a 3-tuple of integers in this case.
* gh-119786: create folder in cpython repo for internals documentation (#119787)Irit Katriel2024-05-301-0/+12
|
* gh-119779: Fix pyporting howto docs (#119785)Awbert2024-05-301-2/+2
|
* gh-119336: Restore removed _PyLong_NumBits() function (#119418)Ethan Smith2024-05-303-11/+10
| | | It is used by the pywin32 project.
* gh-110383: Remove references to removed popen[234] (GH-112783)Bradley Reynolds2024-05-302-146/+2
| | | Signed-off-by: Bradley Reynolds <bradley.reynolds@darbia.dev>
* gh-118055: Update the finder glossary entry (GH-118278)Lincoln2024-05-301-2/+2
|
* gh-118235: Move RAISE_SYNTAX_ERROR actions to invalid rules and make sure ↵Petr Viktorin2024-05-305-1434/+1584
| | | | | | | | 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.
* GH-89727: Fix FD leak on `os.fwalk()` generator finalization. (#119766)Barney Gale2024-05-302-2/+30
| | | | Follow-up to 3c890b50. Ensure we `os.close()` open file descriptors when the `os.fwalk()` generator is finalized.
* GH-89727: Fix `os.fwalk()` recursion error on deep trees (#119638)Barney Gale2024-05-303-40/+56
| | | | Implement `os.fwalk()` using a list as a stack to avoid emitting recursion errors on deeply nested trees.
* subprocess docs: Fix semantically important typo (GH-119752)Zachary Ware2024-05-291-1/+1
| | | | | 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.
* GH-119169: Implement `pathlib.Path.walk()` using `os.walk()` (#119573)Barney Gale2024-05-293-39/+34
| | | | | | 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()`.
* GH-89727: Partially fix `shutil.rmtree()` recursion error on deep trees ↵Barney Gale2024-05-294-28/+33
| | | | | | | | | | | (#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>
* gh-119525: Fix deadlock with `_PyType_Lookup` and the GIL (#119527)Sam Gross2024-05-292-4/+9
| | | | | | | | | | 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-119070: Fix py.exe handling of /usr/bin/env commands missing extension ↵Steve Dower2024-05-293-1/+12
| | | | (GH-119426)
* gh-119594: Improve pow(fraction.Fraction(), b, modulo) error message (#119593)Wim Jeantine-Glenn2024-05-293-1/+10
| | | | | | 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>
* gh-119260: Clarify is_dataclass Behavior for Subclasses in Documentation and ↵Aditya Borikar2024-05-292-2/+20
| | | | | Tests (#119480) Co-authored-by: Carl Meyer <carl@oddbird.net>
* gh-93963: Remove deprecated names from importlib.abc (#119720)Hugo van Kemenade2024-05-293-25/+26
| | | | Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* gh-118673: Remove shebang and executable bits from stdlib modules. (#119658)Jason R. Coombs2024-05-2928-37/+1
| | | | | | | * 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.