| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
after using a history search (GH-124396) (#124530)
gh-123856: Fix PyREPL failure when a keyboard interrupt is triggered after using a history search (GH-124396)
(cherry picked from commit c1600c78e4565b6bb558ade451abe2648ba4dd0a)
Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#123799)
This switches the main pyrepl event loop to always be non-blocking so that it
can listen to incoming interruptions from other threads.
This also resolves invalid display of exceptions from other threads
(gh-123178).
This also fixes freezes with pasting and an active input hook.
(cherry picked from commit 033510e11dff742d9626b9fd895925ac77f566f1)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
| |
(#123784)
(cherry picked from commit e95984826eb3cdb3a3baedb2ccea35e11e9f8161)
Co-authored-by: aorcajo <589252+aorcajo@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-123607) (GH-123773)
Change <page up> and <page down> keys of the Python REPL to history
search forward/backward.
(cherry picked from commit 8311b11800509c975023e062e2c336f417c5e4c0)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
| |
(GH-123196) (GH-123764)
(cherry picked from commit d683f49a7b0635a26150cfbb398a3d93b227a74e)
Co-authored-by: Arnon Yaari <wiggin15@yahoo.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
gh-123177: Fix prompt for wrapped lines in pyrepl (GH-123324)
When display lines above the cursor come from the cache, the first line
to not come from the cache may be a wrapped line, starting half way
through a logical line in the buffer. Detect and handle this case to
avoid accidentally drawing a stray prompt in the middle of a logical
line.
(cherry picked from commit 602fcf97df1665538d4e9841f9dc6bc33e38bece)
Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
|
| |
|
|
| |
(#123313)
|
| |
|
|
|
|
|
|
|
| |
(GH-123281) (#123293)
gh-123228: fix return type for _ReadlineWrapper.get_line_buffer() (GH-123281)
(cherry picked from commit ca18ff2a34435faa557f7f9d4d3a554dadb05e50)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
|
| |
|
|
|
|
|
| |
(#123252)
Make sure that pyrepl uses the same logic for sys.tracebacklimit as both
the basic repl and the standard sys.excepthook
(cherry picked from commit 63603bca35798c166e1b8e0be76aef69217f8b1b)
|
| |
|
|
|
|
|
|
| |
REPL (GH-123233) (#123247)
gh-122546: Relax SyntaxError check when raising errors on the new REPL (GH-123233)
(cherry picked from commit 4c3f0cbeaec0d49212d305618743fabb0e74a696)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
|
| |
|
|
| |
(GH-123217) (#123226)
|
| |
|
|
|
| |
(GH-121886) (#123148)
(cherry picked from commit 354d55eb1fa40f272419aa6459ee5d2c4804c8ea)
|
| |
|
|
|
|
|
|
|
| |
sys.excepthook (GH-122456) (GH-122514)
Before, the exception caused by calling non-default sys.excepthook
in code.InteractiveInterpreter bubbled up to the caller, ending the REPL.
(cherry picked from commit bd3d31f380cd451a4ab6da5fbfde463fed95b5b5)
Co-authored-by: CF Bolz-Tereick <cfbolz@gmx.de>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the flakiness in:
* test_inspect_keeps_globals_from_inspected_file
* test_inspect_keeps_globals_from_inspected_module
The output already includes newlines. Adding newlines for every entry in
the output list introduces non-determinism because it added '\n' in
places where stdout is flushed or some buffer becomes full.
The regex also needed to be updated because pyrepl includes control
characters -- the visible output on each line doesn't immediately follow
a newline character.
(cherry picked from commit 2c1b1e7a07eba0138b9858c6f2bea3cae9af0808)
Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
|
|
|
| |
(#122064)
gh-121988: Fix test hang when pyrepl is not available (GH-121990)
Also explicitly fail the test if we timeout while waiting for output so
that this failure mode is caught earlier.
(cherry picked from commit a09e215abf3c80a3c99c86b4482b512b42aad072)
Co-authored-by: Sam Gross <colesbury@gmail.com>
|
| |
|
|
|
|
|
|
| |
(#121929)
gh-120678: Guard against stdin.fileno() being unavailable (GH-121924)
(cherry picked from commit 19cbf8fd636192059550d0c908c3e29797feed1f)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
| |
(GH-120904) (#121916)
(cherry picked from commit ac07451116d52dd6a5545d27b6a2e3737ed27cf0)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
blocks are pasted (GH-121757) (GH-121825)
console.compile with the "single" param throws an exception when
there are multiple statements, never allowing to adding newlines
to a pasted code block (gh-121610)
This adds a few extra checks to allow extending when in an indented
block, and tests for a few examples.
(cherry picked from commit 7d111dac160c658b277ec0fac75eee8edcfbe9dc)
Co-authored-by: saucoide <32314353+saucoide@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
|
| |
(GH-121823)
The fallback repl does not support "exit" without parentheses, so the
test would hang until the timeout expired.
(cherry picked from commit 4134261ab831863565fefc7a04d05a1fc1bca2f8)
Co-authored-by: Sam Gross <colesbury@gmail.com>
|
| |
|
|
|
|
|
|
| |
test_pyrepl.TestMain (GH-121672) (GH-121810)
(cherry picked from commit fd085a411ed2ccc9bde2338cf50068bc7f213ece)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
| |
joiner (GH-121667) (#121733)
Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
|
| |
|
|
|
|
|
| |
We also need to close the `slave_fd` earlier so that reading from
`master_fd` won't block forever when the subprocess finishes.
(cherry picked from commit abc3aeebdbae560476f2f8c0312e9a4bf0dbfd33)
Co-authored-by: Sam Gross <colesbury@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
(#121679)
gh-121499: Fix multi-line history rendering in the REPL (GH-121531)
(cherry picked from commit 4b9e10d0ea352592049c1f2a00318d7274143fa4)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-121422) (#121449)
gh-121351: Skip test_not_wiping_history_file() if no readline (GH-121422)
(cherry picked from commit 68e279b37aae3019979a05ca55f462b11aac14be)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
gh-121359: Run test_pyrepl in isolated mode (GH-121414)
run_repl() now pass the -I option (isolated mode) to Python if the
'env' parameter is not set.
(cherry picked from commit 6239d41527d5977aa5d44e4b894d719bc045860e)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
| |
(#121322)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-121017) (#121064)
* gh-121016: Add test for `PYTHON_BASIC_REPL` envioronment variable (#121017)
(cherry picked from commit 9e45fd9858a059950f7387b4fda2b00df0e8e537)
* [3.13] gh-121016: Add test for `PYTHON_BASIC_REPL` envioronment variable (GH-121017)
(cherry picked from commit 9e45fd9858a059950f7387b4fda2b00df0e8e537)
Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
|
| |
|
|
| |
(#121059)
|
| |
|
|
|
|
|
|
|
|
| |
gh-120635: Avoid leaking processes in test_pyrepl (GH-120676)
If the child process takes longer than SHORT_TIMEOUT seconds to
complete, kill the process but then wait until it completes with no
timeout to not leak child processes.
(cherry picked from commit 0f3e36454d754026d6c510053ff1e4b22ae80cd9)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
| |
(GH-120408) (#120430)
(cherry picked from commit 3453362183f083e37ea866a7ae1b34147ffaf81d)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
| |
|
|
| |
definitions on new REPL startup (GH-119547) (#120362)
|
| |
|
|
|
|
|
| |
(cherry picked from commit d9095194dde27eaabfc0b86a11989cdb9a2acfe1)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
|
| |
|
|
|
|
| |
(cherry picked from commit 010ea93b2b888149561becefeee90826bf8a2934)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-120042) (#120051)
* gh-120041: Do not use append_to_screen when completions are visible (GH-120042)
(cherry picked from commit 8fc7653766b106bdbc4ff6154e0020aea4ab15e6)
* gh-120041: Refactor check for visible completion menu in completing_reader (GH-120055)
(cherry picked from commit bf8e5e53d0c359a1f9c285d855e7a5e9b6d91375)
---------
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
| |
|
|
|
|
|
|
| |
containing ANSI escape codes (GH-119942) (#119990)
gh-118835: pyrepl: Fix prompt length computation for custom prompts containing ANSI escape codes (GH-119942)
(cherry picked from commit 2e0aa731aebb8ef3d89ada82f5d39b1bbac65d1f)
Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
|
| |
|
|
|
|
| |
(cherry picked from commit 6acb32fac3511c1d5500cac66f1d6397dcdab835)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Ee Durbin <ee@python.org>
|
| |
|
|
|
|
|
|
| |
gh-111201: Skip pyrepl Windows tests earlier (#119848)
Don't attempt to load pyrepl Windows console if platforms others than
Windows. For example, the import can fail if ctypes is missing.
(cherry picked from commit 91601a55964fdb3c02b21fa3c8dc629daff2390f)
|
| |
|
|
|
| |
(cherry picked from commit 2237946af0981c46dc7d3886477e425ccfb37f28)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
| |
(cherry picked from commit 0d07182821fad7b95a043d006f1ce13a2d22edcb)
Co-authored-by: Dino Viehland <dinoviehland@gmail.com>
Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
| |
- auto-indent when editing multi-line block
- ignore comments
(cherry picked from commit dae0375bd97f3821c5db1602a0653a3c5dc53c5b)
Co-authored-by: Arnon Yaari <wiggin15@yahoo.com>
|
| |
|
|
| |
InteractiveColoredConsole (GH-119557) (#119709)
|
| |
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
| |
(cherry picked from commit 6e012ced6cc07a7502278e1849c5618d1ab54a08)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#119439)
(cherry picked from commit e6572e8f98d33994d2d0dd3afa92a2a72ee642a9)
Also includes:
* gh-111201: Use calc_complete_screen after bracketed paste in PyREPL (GH-119432)
(cherry picked from commit 14b063cbf1bb11a489d04a31f277edba0fc8893c)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
| |
|
|
|
|
|
|
| |
from terminating the code block (GH-119355) (#119404)
(cherry picked from commit 5091c4400c9ea2a2d1e4d89a28c9d0de2651fa6d)
Co-authored-by: Aya Elsayed <ayah.ehab11@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
| |
(cherry picked from commit cd516cd1f5e94dba887353f421513fd172efadf3)
Co-authored-by: Arnon Yaari <wiggin15@yahoo.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
| |
(#119414)
(cherry picked from commit 73ab83b27f105a4509046ce26e35f20d66625195)
Co-authored-by: Eugene Triguba <eugenetriguba@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
| |
(GH-119318) (#119408)
(cherry picked from commit a3e4fec8734a304d654e4ae24a4aa2f41a7b0640)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
| |
(cherry picked from commit 506b1a3ff66a41c72d205c8e4cba574e439d8e76)
Co-authored-by: Koudai Aono <koxudaxi@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
| |
(#119403)
(cherry picked from commit 561ff1fa710493dee8c6482f990bd17535b27040)
|