mirror of https://github.com/python/cpython
gh-123240: Raise input audit events in the new REPL (#123274)
This commit is contained in:
parent
327463aef1
commit
aa1339aaaa
|
@ -365,8 +365,12 @@ class _ReadlineWrapper:
|
|||
except _error:
|
||||
assert raw_input is not None
|
||||
return raw_input(prompt)
|
||||
reader.ps1 = str(prompt)
|
||||
return reader.readline(startup_hook=self.startup_hook)
|
||||
prompt_str = str(prompt)
|
||||
reader.ps1 = prompt_str
|
||||
sys.audit("builtins.input", prompt_str)
|
||||
result = reader.readline(startup_hook=self.startup_hook)
|
||||
sys.audit("builtins.input/result", result)
|
||||
return result
|
||||
|
||||
def multiline_input(self, more_lines: MoreLinesCallable, ps1: str, ps2: str) -> str:
|
||||
"""Read an input on possibly multiple lines, asking for more
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Raise audit events for the :func:`input` in the new REPL.
|
Loading…
Reference in New Issue