diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-05-22 16:07:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-22 16:07:38 (GMT) |
commit | eafd633fac0c25ffdb98ffee31184eb3b4ca8b88 (patch) | |
tree | b4d4205db356b5bec2515d8c79f5b535796f8384 /Lib/_pyrepl | |
parent | aefe2e626eeb2f05cda10a17926f8ba9b7a504ca (diff) | |
download | cpython-eafd633fac0c25ffdb98ffee31184eb3b4ca8b88.zip cpython-eafd633fac0c25ffdb98ffee31184eb3b4ca8b88.tar.gz cpython-eafd633fac0c25ffdb98ffee31184eb3b4ca8b88.tar.bz2 |
[3.13] gh-119205: Fix autocompletion bug in new repl (GH-119229) (#119407)
(cherry picked from commit 506b1a3ff66a41c72d205c8e4cba574e439d8e76)
Co-authored-by: Koudai Aono <koxudaxi@gmail.com>
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 8de60ff..e3444d9 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 @@ -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 |