mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
Merge ae66ca5819 into f9704f1d84
This commit is contained in:
commit
9b65598eb2
2 changed files with 8 additions and 1 deletions
|
|
@ -374,7 +374,12 @@ class _ReadlineWrapper:
|
|||
prompt_str = str(prompt)
|
||||
reader.ps1 = prompt_str
|
||||
sys.audit("builtins.input", prompt_str)
|
||||
result = reader.readline(startup_hook=self.startup_hook)
|
||||
try:
|
||||
can_colorize = reader.can_colorize
|
||||
reader.can_colorize = False
|
||||
result = reader.readline(startup_hook=self.startup_hook)
|
||||
finally:
|
||||
reader.can_colorize = can_colorize
|
||||
sys.audit("builtins.input/result", result)
|
||||
return result
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
Fixes syntax highlighting/colorization being applied to input that is read
|
||||
in via the pyrepl readline interface
|
||||
Loading…
Add table
Add a link
Reference in a new issue