summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-111201: Improve pyrepl auto indentation (GH-119606) (GH-119833)Miss Islington (bot)2024-05-313-11/+101
| | | | | | | | - auto-indent when editing multi-line block - ignore comments (cherry picked from commit dae0375bd97f3821c5db1602a0653a3c5dc53c5b) Co-authored-by: Arnon Yaari <wiggin15@yahoo.com>
* [3.13] gh-97747: Improvements to WASM browser REPL. (GH-97665) (GH-119828)Miss Islington (bot)2024-05-312-8/+69
| | | | | (cherry picked from commit 010aaa32fb93c5033a698d7213469af02d76fef3) Co-authored-by: Katie Bell <katie@katharos.id.au>
* [3.13] gh-119548: Add a 'clear' command to the REPL (GH-119549) (#119552)Miss Islington (bot)2024-05-313-1/+12
| | | | | | gh-119548: Add a 'clear' command to the REPL (GH-119549) (cherry picked from commit e3bac04c37f6823cebc74d97feae0e0c25818b31) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.13] gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322) (GH-119806)Miss Islington (bot)2024-05-302-9/+22
| | | | | | (cherry picked from commit 9732ed5ca94cd8fe9ca2fc7ba5a42dfa2b7791ea) Co-authored-by: James De Bias <81095953+DBJim@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] Docs: `shutil.rmtree`'s `onerror` has no pending removal version ↵Miss Islington (bot)2024-05-301-3/+3
| | | | | | (GH-118947) (#119804) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.13] gh-109218: Improve documentation for the complex() constructor ↵Miss Islington (bot)2024-05-304-63/+135
| | | | | | | | | | | | | | | | | | (GH-119687) (GH-119803) * 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.) (cherry picked from commit ec1ba264607b2b7b98d2602f5536a1d02981efc6) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] gh-119791: Fix new Tkinter tests for wantobjects=0 (GH-119792) ↵Miss Islington (bot)2024-05-301-3/+10
| | | | | | | | | (GH-119794) PhotoImage.get() retruns a string instead of a 3-tuple of integers in this case. (cherry picked from commit e875c2d752fed0a8d16958dc7b331e66a2476247) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] gh-119729: Use 't' in pkg-config file name for free-threaded build ↵Miss Islington (bot)2024-05-303-7/+16
| | | | | | | | | | (GH-119738) (#119797) 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`. (cherry picked from commit 1c04c63ced5038e8f45a2aac7dc45f0815a4ddc5) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-117398: Convert datetime.IsoCalendarDate To A Heap Type ↵Miss Islington (bot)2024-05-301-22/+63
| | | | | | | | | | | (gh-119637) (gh-119695) This is the only static type in the module that we will not keep static. (cherry picked from commit 548a11d5cf1dbb32d86ce0c045130c77f50c1427) (cherry-picked from commit 34f9b3e7244615d2372614b20e10250e68cc8e61) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com> Co-authored by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.13] gh-119779: Fix pyporting howto docs (GH-119785) (#119788)Miss Islington (bot)2024-05-301-2/+2
| | | | | | gh-119779: Fix pyporting howto docs (GH-119785) (cherry picked from commit 6fb191be15fd49da10506de29b6393ffdf59b894) Co-authored-by: Awbert <119314310+SweetyAngel@users.noreply.github.com>
* [3.13] gh-117142: Slightly hacky fix for memory leak of StgInfo (GH-119424) ↵Miss Islington (bot)2024-05-302-53/+45
| | | | | | | | | | | | | | | | | | (GH-119468) gh-117142: Slightly hacky fix for memory leak of StgInfo (GH-119424) Add a funciton that inlines PyObject_GetTypeData and skips type-checking, so it doesn't need access to the CType_Type object. This will break if the memory layout changes, but should be an acceptable solution to enable ctypes in subinterpreters in Python 3.13. Mark _ctypes as safe for multiple interpreters (cherry picked from commit a192547dfe7c4f184cc8b579c3eff2f61f642483) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
* [3.13] gh-118055: Update the finder glossary entry (GH-118278) (GH-119773)Miss Islington (bot)2024-05-301-2/+2
| | | | | | gh-118055: Update the finder glossary entry (GH-118278) (cherry picked from commit db009348b4b7a4b0aec39472ea074c1b5feeba9b) Co-authored-by: Lincoln <71312724+Lincoln-developer@users.noreply.github.com>
* [3.13] subprocess docs: Fix semantically important typo (GH-119752) (#119757)Miss Islington (bot)2024-05-301-1/+1
| | | | | | | | | | subprocess docs: Fix semantically important typo (GH-119752) 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. (cherry picked from commit 2cc3502f98bb9aea386ab55443fc077ddcdde91d) Co-authored-by: Zachary Ware <zach@python.org>
* [3.13] GH-89727: Fix FD leak on `os.fwalk()` generator finalization. ↵Miss Islington (bot)2024-05-302-2/+30
| | | | | | | | | | | (GH-119766) (#119767) GH-89727: Fix FD leak on `os.fwalk()` generator finalization. (GH-119766) Follow-up to 3c890b50. Ensure we `os.close()` open file descriptors when the `os.fwalk()` generator is finalized. (cherry picked from commit a5fef800d31648d19cecc240a2fa0dc71371753e) Co-authored-by: Barney Gale <barney.gale@gmail.com>
* [3.13] GH-89727: Fix `os.fwalk()` recursion error on deep trees (GH-119638) ↵Miss Islington (bot)2024-05-303-40/+56
| | | | | | | | | | | (#119764) GH-89727: Fix `os.fwalk()` recursion error on deep trees (GH-119638) Implement `os.fwalk()` using a list as a stack to avoid emitting recursion errors on deeply nested trees. (cherry picked from commit 3c890b503c740767d0eb9a0e74b47f17a1e69452) Co-authored-by: Barney Gale <barney.gale@gmail.com>
* [3.13] gh-119260: Clarify is_dataclass Behavior for Subclasses in ↵Miss Islington (bot)2024-05-302-2/+20
| | | | | | | | | Documentation and Tests (GH-119480) (#119760) gh-119260: Clarify is_dataclass Behavior for Subclasses in Documentation and Tests (GH-119480) (cherry picked from commit bf4ff3ad2e362801e87c85fffd9e140b774cef26) Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com> Co-authored-by: Carl Meyer <carl@oddbird.net>
* [3.13] gh-117398: Add multiphase support to _datetime (gh-119694)Eric Snow2024-05-292-15/+31
| | | | | | | | | This is an unrevert of d58ebf0 (gh-119636), which was reverted by 9216a53 (gh-119639) due to problems which have been resolved. This is minimal support for multiphase init. Subinterpreters are not supported yet. That will be addressed in a later change. (cherry picked from commit 3e8b609) Co-authored-by: Erlend E. Aasland erlend@python.org
* [3.13] GH-119169: Implement `pathlib.Path.walk()` using `os.walk()` ↵Miss Islington (bot)2024-05-293-39/+34
| | | | | | | | | | | | | (GH-119573) (#119750) GH-119169: Implement `pathlib.Path.walk()` using `os.walk()` (GH-119573) 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()`. (cherry picked from commit 7ff61f51b6f75315291419269295a8ac3933397b) Co-authored-by: Barney Gale <barney.gale@gmail.com>
* [3.13] GH-89727: Partially fix `shutil.rmtree()` recursion error on deep ↵Miss Islington (bot)2024-05-294-28/+33
| | | | | | | | | | | | | | | | trees (GH-119634) (#119748) GH-89727: Partially fix `shutil.rmtree()` recursion error on deep trees (GH-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. (cherry picked from commit a150679f90c6e3f017bd75cac3b8f727063cc4aa) Co-authored-by: Barney Gale <barney.gale@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-119070: Fix py.exe handling of /usr/bin/env commands missing extension ↵Miss Islington (bot)2024-05-293-1/+12
| | | | | | | (GH-119426) (cherry picked from commit df93f5d4bf9d70036d485666d4dd4f009d37f8b9) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.13] gh-119525: Fix deadlock with `_PyType_Lookup` and the GIL (GH-119527) ↵Miss Islington (bot)2024-05-292-4/+9
| | | | | | | | | | | | | | | (#119746) 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`. (cherry picked from commit c22323cd1c200ca1b22c47af95f67c4b2d661fe7) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-119555: catch SyntaxError from compile() in the ↵Miss Islington (bot)2024-05-293-1/+11
| | | | InteractiveColoredConsole (GH-119557) (#119709)
* [3.13] gh-119661: Add _Py_SINGLETON() include in Argumenet Clinic (#119712) ↵Victor Stinner2024-05-2912-19/+43
| | | | | | | | | | | (#119716) gh-119661: Add _Py_SINGLETON() include in Argumenet Clinic (#119712) When the _Py_SINGLETON() is used, Argument Clinic now adds an explicit "pycore_runtime.h" include to get the macro. Previously, the macro may or may not be included indirectly by another include. (cherry picked from commit 7ca74a760a5d3cdf48159f003d4db7c2778e9261)
* [3.13] gh-119704: Fix reference leak in the ``Python/Python-tokenize.c`` ↵Miss Islington (bot)2024-05-291-0/+1
| | | | (GH-119705) (#119707)
* [3.13] gh-119443: Turn off from __future__ import annotations in REPL ↵Miss Islington (bot)2024-05-293-1/+12
| | | | | | | | (GH-119493) (#119697) gh-119443: Turn off from __future__ import annotations in REPL (GH-119493) (cherry picked from commit a8e35e8ebad8c3bb44d14968aa05d1acbc028247) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.13] gh-119538: Add missing expat build dependencies (GH-119647) (#119685)Miss Islington (bot)2024-05-281-1/+3
| | | | | | | | xmltok_impl.c and xmltok_ns.c are _included_ in xmltok.c by the C pre-processor. (cherry picked from commit 606be663622c6784aed4ffa55b877adbd6fe8e54) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* [3.13] gh-117398: Statically Allocate the Datetime C-API (GH-119472) (gh-119641)Eric Snow2024-05-283-110/+194
| | | | | | | This is a backport of 3 commits that go together. (cherry picked from commit a895756) (cherry picked from commit b30d30c) (cherry picked from commit a89fc26)
* [3.13] gh-119118: Fix performance regression in tokenize module (GH-119615) ↵Miss Islington (bot)2024-05-284-4/+68
| | | | | | | | | | | | | (#119682) - Cache line object to avoid creating a Unicode object for all of the tokens in the same line. - Speed up byte offset to column offset conversion by using the smallest buffer possible to measure the difference. (cherry picked from commit d87b0151062e36e67f9e42e1595fba5bf23a485c) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* [3.13] gh-119011: `type.__type_params__` now return an empty tuple ↵Miss Islington (bot)2024-05-284-0/+19
| | | | | | | (GH-119296) (#119678) (cherry picked from commit 6b240c2308a044e38623900ccb8fa58c3549d4ae) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.13] gh-119311: Fix name mangling with PEP 695 generic classes (#119464) ↵Jelle Zijlstra2024-05-287-14/+150
| | | | | | | | (#119643) Fixes #119311. Fixes #119395. (cherry picked from commit a9a74da4a0ca0645f049e67b6434a95e30592c32)
* [3.13] gh-119581: Add a test of InitVar with name shadowing (GH-119582) ↵Miss Islington (bot)2024-05-281-0/+23
| | | | | | | | (#119672) gh-119581: Add a test of InitVar with name shadowing (GH-119582) (cherry picked from commit 6ec371223dff4da7719039e271f35a16a5b861c6) Co-authored-by: Steven Troxler <steven.troxler@gmail.com>
* [3.13] Clarify base64.a85encode docs: *wrapcols* doesn't count the newline ↵Miss Islington (bot)2024-05-282-2/+2
| | | | | | | | (GH-119409) (GH-119483) Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409) (cherry picked from commit ffa24aab107b5bc3c6ad31a6a245c226bf24b208) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.13] [doc] Clarify the nature of the root logger in the `logging` ↵Miss Islington (bot)2024-05-281-9/+11
| | | | | documentation (GH-119440) (GH-119651) (cherry picked from commit b407ad38fb93585332c370b8fa56905fb238cdfd)
* [3.13] Re-order imports to align with zipp 3.18.2 (GH-119587) (#119589)Miss Islington (bot)2024-05-282-3/+3
| | | | | | Re-order imports to align with zipp 3.18.2 (GH-119587) (cherry picked from commit 5482a939ac18f4cd861d212c759960af8fa2b19d) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* [3.13] gh-116860: Remove outdated `test_parserhack` from `test_future` ↵Miss Islington (bot)2024-05-281-20/+0
| | | | | | | | (GH-116861) (#119649) gh-116860: Remove outdated `test_parserhack` from `test_future` (GH-116861) (cherry picked from commit 669175bf8edc2c02d48401bac0e4c7d99a33f15b) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.13] gh-117398: Revert gh-119636, Add multiphase support to _datetime ↵Eric Snow2024-05-282-32/+15
| | | | | | | (#119639) Revert "[3.13] gh-117398: Add multiphase support to _datetime (gh-119373) (gh-119636)" This reverts commit d58ebf073c755c2f0f6e4ef2296b48a4c75e5f1c.
* [3.13] gh-119317: findall instead of traverse for docutils nodes (GH-119319) ↵Miss Islington (bot)2024-05-272-4/+4
| | | | | | | | (#119486) gh-119317: findall instead of traverse for docutils nodes (GH-119319) (cherry picked from commit 0867bce45768454ee31bee95ca33fdc2c9d8b0fa) Co-authored-by: Carlos Meza <hire@carlosmeza.com>
* [3.13] gh-117398: Add multiphase support to _datetime (gh-119373) (gh-119636)Miss Islington (bot)2024-05-272-15/+32
| | | | | | | | This is minimal support. Subinterpreters are not supported yet. That will be addressed in a later change. (cherry picked from commit 3e8b60905e97a4fe89bb24180063732214368938) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-119584: Fix test_import Failed Assertion (gh-119623) (gh-119633)Miss Islington (bot)2024-05-273-2/+8
| | | | | | | The fix in gh-119561 introduced an assertion that doesn't hold true if any of the three new test extension modules are loaded more than once. This is fine normally but breaks if the new test_check_state_first() is run more than once, which happens for refleak checking and with the regrtest --forever flag. We fix that here by clearing each of the three modules after loading them. We also tweak a check in _modules_by_index_check(). (cherry picked from commit ae7b17673f29efe17b416cbcfbf43b5b3ff5977c) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-119560: Drop an Invalid Assert in PyState_FindModule() (gh-119561) ↵Miss Islington (bot)2024-05-274-4/+100
| | | | | | | | | (gh-119632) The assertion was added in gh-118532 but was based on the invalid assumption that PyState_FindModule() would only be called with an already-initialized module def. I've added a test to make sure we don't make that assumption again. (cherry picked from commit 0c5ebe13e9937c446e9947c44f2570737ecca135) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] Docs: Move inline JavaScript to own file to reduce duplication ↵Hugo van Kemenade2024-05-272-85/+90
| | | | (GH-119541) (#119630)
* [3.13] Misc cleanups and wording improvements for the itertools docs ↵Miss Islington (bot)2024-05-271-122/+116
| | | | (gh-119626) (gh-119629)
* [3.13] gh-119580: Improve version added section for convenience variable ↵Miss Islington (bot)2024-05-271-0/+2
| | | | | | (GH-119583) (#119624) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* [3.13] Docs: Only install sphinx-autobuild for `make htmllive` (GH-119607) ↵Miss Islington (bot)2024-05-272-2/+5
| | | | | | (#119621) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.13] gh-119467: Fix Py_buffer.format type and correct documentation typo ↵Miss Islington (bot)2024-05-271-2/+2
| | | | | | | | (GH-119475) (#119602) gh-119467: Fix Py_buffer.format type and correct documentation typo (GH-119475) (cherry picked from commit 3b26cd8ca0e6c65e4b61effea9aa44d06e926797) Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com>
* [3.13] Fix typos in HISTORY documentation (GH-119453) (#119597)Miss Islington (bot)2024-05-272-35/+36
| | | | Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
* [3.13] gh-111997: Fix argument count for LINE event and clarify type of ↵Miss Islington (bot)2024-05-261-10/+12
| | | | | | | | argument counts. (GH-119179) (GH-119575) gh-111997: Fix argument count for LINE event and clarify type of argument counts. (GH-119179) (cherry picked from commit 70b07aa4153c1a914a3d69307d5b258cf7ed16ab) Co-authored-by: scoder <stefan_ml@behnel.de>
* [3.13] docs: fix a few typos identified by codespell (GH-119516) (#119570)Miss Islington (bot)2024-05-2618-23/+23
| | | | Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
* [3.13] gh-99180: Make `StackSummary.should_show_carets` private (GH-119554) ↵Miss Islington (bot)2024-05-251-2/+2
| | | | | | (#119556) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.13] FAQ: Add reference to Python version numbering scheme (GH-119225) ↵Miss Islington (bot)2024-05-251-2/+2
| | | | | | (#119544) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>