summaryrefslogtreecommitdiffstats
path: root/Lib/_pyrepl/readline.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/_pyrepl/readline.py')
-rw-r--r--Lib/_pyrepl/readline.py4
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