mirror of
https://github.com/python/cpython.git
synced 2025-09-13 12:17:24 +00:00
[3.13] gh-119205: Fix autocompletion bug in new repl (GH-119229) (#119407)
(cherry picked from commit 506b1a3ff6
)
Co-authored-by: Koudai Aono <koxudaxi@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
parent
aefe2e626e
commit
eafd633fac
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
|
||||
|
@ -298,7 +299,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