mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
gh-119205: Fix autocompletion bug in new repl (#119229)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
parent
a3e4fec873
commit
506b1a3ff6
3 changed files with 28 additions and 8 deletions
|
@ -28,6 +28,7 @@ extensions for multiline input.
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import warnings
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
import os
|
||||
|
@ -301,7 +302,8 @@ class _ReadlineWrapper:
|
|||
reader.more_lines = more_lines
|
||||
reader.ps1 = reader.ps2 = ps1
|
||||
reader.ps3 = reader.ps4 = ps2
|
||||
return reader.readline(), reader.was_paste_mode_activated
|
||||
with warnings.catch_warnings(action="ignore"):
|
||||
return reader.readline(), reader.was_paste_mode_activated
|
||||
finally:
|
||||
reader.more_lines = saved
|
||||
reader.paste_mode = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue