| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
candidates for suggestions (gh-131001) (gh-135020)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
| |
REPL (gh-134136) (gh-134221)
(cherry picked from commit c31547a5914db93b8b38c6a5261ef716255f3582)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
| |
(GH-133640) (#133647)
|
| |
|
|
|
|
|
|
|
| |
points in new pyrepl on Windows (gh-131901) (gh-133468)
(cherry picked from commit 0c5151bc81ec8e8588bef4389df12a9ab50e9fa0)
Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
(GH-133462)
(cherry picked from commit 7c98b0674daa3e4eb3e8f35afb61a0dba61d1780)
Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
|
| |
|
|
|
|
|
|
| |
cmd.exe (GH-132440) (GH-133460)
(cherry picked from commit 07f416a3f063db6b91b8b99ff61a51b64b0503f1)
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-124119) (GH-133457)
To support virtual terminal mode in Windows PYREPL, we need a scanner
to read over the supported escaped VT sequences.
Windows REPL input was using virtual key mode, which does not support
terminal escape sequences. This patch calls `SetConsoleMode` properly
when initializing and send sequences to enable bracketed-paste modes
to support verbatim copy-and-paste.
(cherry picked from commit a65366ed879a3d9f27cbcc811ed2e05ad1a2af06)
Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com>
Signed-off-by: y5c4l3 <y5c4l3@proton.me>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
Co-authored-by: wheeheee <104880306+wheeheee@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
reported (GH-133055) (#133095)
(cherry picked from commit b739ec5ab78ed55367516de7a11e732cb3f1081d)
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
|
| |
|
|
|
|
|
|
| |
reporting tracebacks (GH-130721) (#132755)
gh-129098: avoid using content of `_pyrepl/__main__.py` when reporting tracebacks (GH-130721)
(cherry picked from commit 492e3e6976d05b8de1892c37c900ada23eaeaf06)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
behavior (follow-up gh-131065) (GH-131836) (#131841)
gh-117174: Adapt `test_multiple_statements_fail_early` to new REPL behavior (follow-up gh-131065) (GH-131836)
Adapt test to new REPL behavior (follow-up gh-117174)
(cherry picked from commit a6cf8275f8b477d34c86c8f89a3ca32e78084add)
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
|
| |
|
|
|
|
|
|
| |
(#130513)
gh-128231: Use `runcode()` return value for failing early (GH-129488)
(cherry picked from commit 7ed3dc6392613832f66c63507385b1da109cbf21)
Co-authored-by: Bartosz Sławecki <bartoszpiotrslawecki@gmail.com>
|
| |
|
|
|
| |
(GH-131546)
(cherry picked from commit 5d8e981c8477ce483374b2fe6cd309a08c956299)
|
| |
|
|
|
|
|
|
| |
REPL (GH-125001) (#131061)
gh-124927: Fix conversion issue between coordinates and position in REPL (GH-125001)
(cherry picked from commit 6ab5c4aa05bf35832a3ccd1e71b28b8475fa30f4)
Co-authored-by: FeH2 <i@feh2.im>
|
| |
|
|
|
|
| |
gh-126332: Add tests for _pyrepl.utils (GH-129325)
(cherry picked from commit 0c4248f88e279df3254d62b34dfa3204a92c56a0)
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
|
| |
|
| |
(cherry picked from commit 510fefdc625dd2ed2b6b3975314a59e291b94ae8)
|
| |
|
|
|
|
|
|
|
|
| |
(GH-118939) (#129161)
gh-118878: Pyrepl: show completions menu below the current line (GH-118939)
(cherry picked from commit 29caec62ee0650493c83c778ee2ea50b0501bc41)
Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
| |
|
|
| |
env vars (GH-127877) (#129138)
|
| |
|
|
|
|
|
|
| |
an invalid value (GH-128653) (#129186)
gh-128636: Fix crash in PyREPL when `os.environ` is overwritten with an invalid value (GH-128653)
(cherry picked from commit ba9a4b621577b92f36d88388cc9f791c2dc7d7ba)
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
commands (GH-124485) (#129155)
gh-123024: Correctly prepare/restore around help and show-history commands (GH-124485)
(cherry picked from commit 5a9afe23620aadea30013076d64686be8bf66f7e)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-126650) (#129154)
gh-126332: Fix pyrepl crash for double ctrl-z in line overflow (GH-126650)
(cherry picked from commit d147e5e52cdb90496ae5fe85b3263cdfa9407a28)
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
(GH-125732) (#126023)
gh-125666: Avoid PyREPL exiting when a null byte is in input (GH-125732)
(cherry picked from commit 44becb8cba677cbfdbcf2f7652277e5e1efc4f20)
Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
REPL (#124999) (#125475)
gh-124960: Fixed `barry_as_FLUFL` future flag does not work in new REPL (#124999)
Co-authored-by: Wulian <xiguawulian@gmail.com>
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 6a08a753b702ac63c9b6ac58dd204d1fe9662e9d)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(#125097) (#125111)
gh-125096: Don't import _pyrepl in site if PYTHON_BASIC_REPL (#125097)
If the PYTHON_BASIC_REPL environment variable is set, the site module
no longer imports the _pyrepl module.
Moreover, the site module now respects -E and -I command line
options: ignore PYTHON_BASIC_REPL in this case.
(cherry picked from commit 65ce228d63878d8b6d0005f682e89ad9d5289c4b)
|
| |
|
|
|
|
|
|
|
| |
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)
|