Matt Wozniski
fd37f1a8ad
gh-133490: Fix syntax highlighting for remote PDB ( #133494 )
2025-05-06 11:44:49 +02:00
Noah Kim
c4bcc6a778
gh-102567: Add -X importtime=2 for logging an importtime message for already-loaded modules ( #118655 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-05-06 01:03:55 +01:00
Łukasz Langa
f610bbdf74
gh-133346: Make theming support in _colorize extensible (GH-133347)
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-05-05 23:45:25 +02:00
Stan Ulbrych
e4561da886
gh-132017: Handle SIGCONT in pyrepl
( #132918 )
2025-05-05 20:37:01 +00:00
Chris Eibl
07f416a3f0
GH-132439: Fix REPL swallowing characters entered with AltGr on cmd.exe (GH-132440)
...
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-05-05 18:45:45 +02:00
Sergey Miryanov
0c5151bc81
gh-131878: Fix input of unicode characters with two or more code points in new pyrepl on Windows (gh-131901)
...
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2025-05-05 18:25:00 +02:00
Sergey Miryanov
99a0d7e5b3
gh-131878: Handle top level exceptions in new pyrepl and prevent of closing it ( #131910 )
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-05 16:54:19 +02:00
sobolevn
8467026ed6
Bump mypy to 1.15 ( #133405 )
2025-05-05 13:29:48 +03:00
Łukasz Langa
fac41f56d4
gh-131507: Add support for syntax highlighting in PyREPL (GH-133247)
...
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-05-02 20:22:31 +02:00
Chris Eibl
acb222ce8f
GH-130328: pasting in new REPL is slow on Windows (GH-132884)
2025-04-29 18:03:45 +02:00
Sergey B Kirpichev
276252565c
gh-127495: Append to history file after every statement in PyREPL (GH-132294)
2025-04-27 15:32:37 +02:00
Tomas R.
c3a7118065
gh-69605: Add module autocomplete to PyREPL ( #129329 )
2025-04-25 02:24:26 +01:00
Bénédikt Tran
492e3e6976
gh-129098: avoid using content of _pyrepl/__main__.py
when reporting tracebacks ( #130721 )
2025-04-20 18:24:30 +01:00
Łukasz Langa
4cc82ffa37
gh-131507: Refactor screen and cursor position calculations (GH-131547)
...
This is based off #131509 .
2025-03-21 18:27:35 +01:00
Łukasz Langa
5d8e981c84
gh-131507: Clean up tests and type checking for _pyrepl
( #131509 )
2025-03-21 15:48:10 +01:00
Victor Stinner
db27aee2fe
gh-131152: Remove unused imports in _pyrepl
and ctypes
( #131150 )
2025-03-12 14:04:12 +00:00
Sergey Miryanov
7c98b0674d
gh-130804: Fix support of typing unicode chars in pyrepl ( #130805 )
2025-03-10 22:13:50 +00:00
FeH2
6ab5c4aa05
gh-124927: Fix conversion issue between coordinates and position in REPL ( #125001 )
2025-03-10 21:54:49 +00:00
Pablo Galindo Salgado
a931a8b324
gh-117174: Add a new route in linecache to fetch interactive source code ( #117500 )
2025-03-10 21:54:05 +00:00
Bartosz Sławecki
7ed3dc6392
gh-128231: Use runcode()
return value for failing early (GH-129488)
2025-02-24 15:50:13 +01:00
Y5
a65366ed87
gh-124096: Enable REPL virtual terminal support on Windows ( #124119 )
...
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.
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>
2025-02-23 20:30:33 +01:00
donBarbos
510fefdc62
gh-127349: Add check for correct resizing in REPL ( #127387 )
2025-01-30 19:34:09 +00:00
Andy Fiddaman
0b15d9c0d2
gh-128330: Terminal control characters should be restored on repl exit ( #128331 )
2025-01-23 17:30:08 +00:00
Tomas R.
ba9a4b6215
gh-128636: Fix crash in PyREPL when os.environ
is overwritten with an invalid value ( #128653 )
2025-01-22 16:15:23 +00:00
Daniel Hollas
29caec62ee
gh-118878: Pyrepl: show completions menu below the current line ( #118939 )
...
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2025-01-21 21:06:13 +00:00
Lysandros Nikolaou
5a9afe2362
gh-123024: Correctly prepare/restore around help and show-history commands ( #124485 )
...
Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2025-01-21 21:04:30 +00:00
Pieter Eendebak
d147e5e52c
gh-126332: Fix pyrepl crash for double ctrl-z in line overflow ( #126650 )
...
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2025-01-21 20:14:10 +00:00
Paulie Peña
688f3a0d4b
gh-128388: pyrepl on Windows: add meta and ctrl+arrow keybindings (GH-128389)
...
Fix `Lib/_pyrepl/windows_console.py` to support more keybindings, like the
`Ctrl`+`←` and `Ctrl`+`→` word-skipping keybindings and those with meta (i.e. Alt),
e.g. to `kill-word` or `backward-kill-word`.
Specifics: if Ctrl is pressed, emit "ctrl left" and "ctrl right" instead of just "left" or
"right," and if Meta/Alt is pressed, emit the special key code for meta before
emitting the other key that was pressed.
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
2025-01-10 13:52:19 +01:00
RUANG (James Roy)
a327810169
Fix while statements with non-bool conditions in _pyrepl
( #127509 )
...
Fix non-bool value conditions
2025-01-01 20:39:28 +00:00
Victor Stinner
3c7a90a831
gh-122273: Support PyREPL history on Windows ( #127141 )
...
Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
2024-11-26 10:21:57 +01:00
Victor Stinner
b2bbdc56e3
gh-126456: Fix _pyrepl curses tigetstr() ( #126472 )
2024-11-13 17:46:10 +01:00
Wulian
6a08a753b7
gh-124960: Fixed barry_as_FLUFL
future flag does not work in new REPL ( #124999 )
...
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-10-14 15:53:50 +02:00
Dino Viehland
83e5dc0f4d
gh-124628: Pyrepl inputs on Windows shouldn't always be blocking reads ( #124629 )
2024-09-27 00:10:36 +02:00
Emily Morehouse
c1600c78e4
gh-123856: Fix PyREPL failure when a keyboard interrupt is triggered after using a history search ( #124396 )
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-09-25 20:22:03 +02:00
Stefano Rivera
426569eb8c
Support the "pager" binary in _pyrepl ( #122878 )
...
Debian (and derivatives) provide a /usr/bin/pager binary, managed by the
alternatives system, that always points to an available pager utility.
Allow _pyrepl to use it, to follow system policy.
This is a very trivial change, from a patch that Debian has been
carrying since 2.7 era. Seems appropriate to upstream.
https://bugs.debian.org/799555
2024-09-19 13:18:24 +00:00
Miro Hrončok
f4e5643df6
gh-124027: Support Del, PgUp, and PgDn on TERM=vt100 ( #124028 )
...
pyrepl: Support Del, PgUp, and PgDn on TERM=vt100
From Fedora's /etc/inputrc:
"\e[5~": history-search-backward
"\e[6~": history-search-forward
"\e[3~": delete-char
Fixes https://github.com/python/cpython/issues/124027
2024-09-13 02:07:23 +01:00
Łukasz Langa
033510e11d
gh-120221: Support KeyboardInterrupt in asyncio REPL ( #123795 )
...
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.
2024-09-06 21:28:29 +02:00
aorcajo
e95984826e
gh-119310: Fix encoding when reading old history file ( #121779 )
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-09-06 15:40:29 +02:00
Victor Stinner
8311b11800
gh-119034, REPL: Change page up/down keys to search in history ( #123607 )
...
Change <page up> and <page down> keys of the Python REPL to history
search forward/backward.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-09-06 13:15:00 +02:00
Arnon Yaari
d683f49a7b
gh-111201: fix auto-indent in pyrepl for muliple pound comments ( #123196 )
2024-09-06 07:33:40 +00:00
sobolevn
aa1339aaaa
gh-123240: Raise input audit events in the new REPL ( #123274 )
2024-09-05 17:17:24 +02:00
devdanzin
782217f28f
gh-123572: Fix key codes in VK_MAP in windows_console.py ( #122692 )
2024-09-03 13:01:21 +00:00
Matt Wozniski
602fcf97df
gh-123177: Fix prompt for wrapped lines in pyrepl ( #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.
2024-08-25 22:54:06 +00:00
Pablo Galindo Salgado
fdb3f9b588
gh-123177: Deactivate line wrap for Apple Terminal via scape codes in the new REPL ( #123267 )
2024-08-25 22:38:49 +01:00
Sergey B Kirpichev
ca18ff2a34
gh-123228: fix return type for _ReadlineWrapper.get_line_buffer() ( #123281 )
...
Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
2024-08-24 17:46:05 +02:00
Sergey B Kirpichev
3d7b1a526d
gh-122546: use same filename for different exceptions in new repl ( #123217 )
...
* gh-122546: use same filename for different exceptions in new repl
* +1
2024-08-22 12:55:30 +01:00
James
833c58b81e
gh-123149: Suppress verbose repr in new REPL ( #123151 )
2024-08-19 20:04:38 +01:00
Sergey B Kirpichev
354d55eb1f
gh-121804: Always show error location for SyntaxError's in new repl ( #121886 )
2024-08-19 15:19:23 +01:00
CF Bolz-Tereick
63603bca35
gh-82378 fix sys.tracebacklimit in pyrepl, approach 2 ( #123062 )
...
Make sure that pyrepl uses the same logic for sys.tracebacklimit as both
the basic repl and the standard sys.excepthook
2024-08-18 13:28:23 +02:00
Xie Yanbo
253c6a0b2f
Fix typos in comments and test code ( #122846 )
2024-08-11 21:16:41 -07:00