diff options
author | Koudai Aono <koxudaxi@gmail.com> | 2024-05-21 23:22:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-21 23:22:21 (GMT) |
commit | 506b1a3ff66a41c72d205c8e4cba574e439d8e76 (patch) | |
tree | 6671ffb786f3b6104c58d20c2ff2174306f204fb /Lib/_pyrepl | |
parent | a3e4fec8734a304d654e4ae24a4aa2f41a7b0640 (diff) | |
download | cpython-506b1a3ff66a41c72d205c8e4cba574e439d8e76.zip cpython-506b1a3ff66a41c72d205c8e4cba574e439d8e76.tar.gz cpython-506b1a3ff66a41c72d205c8e4cba574e439d8e76.tar.bz2 |
gh-119205: Fix autocompletion bug in new repl (#119229)
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/_pyrepl')
-rw-r--r-- | Lib/_pyrepl/readline.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/_pyrepl/readline.py b/Lib/_pyrepl/readline.py index 9c85ce1..787dbc0 100644 --- a/Lib/_pyrepl/readline.py +++ b/Lib/_pyrepl/readline.py @@ -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 |