summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-05-09 15:47:31 (GMT)
committerGitHub <noreply@github.com>2024-05-09 15:47:31 (GMT)
commit738877a1013f1752cb67c3e6a49121be5f656c72 (patch)
tree22791f0ff637999ee9ec4d0c5e3d311d932228a9 /Lib/asyncio
parenta98e44a5bf935a46822c2ea3619eec49dbecbba8 (diff)
downloadcpython-738877a1013f1752cb67c3e6a49121be5f656c72.zip
cpython-738877a1013f1752cb67c3e6a49121be5f656c72.tar.gz
cpython-738877a1013f1752cb67c3e6a49121be5f656c72.tar.bz2
[3.13] gh-118817: Fix `asyncio REPL` on Windows (GH-118819) (#118847)
(cherry picked from commit c3643a121401d111bebd3e26d6f362ade2ed2a83) Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/__main__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/asyncio/__main__.py b/Lib/asyncio/__main__.py
index cbc1d7c..9041b8b 100644
--- a/Lib/asyncio/__main__.py
+++ b/Lib/asyncio/__main__.py
@@ -108,7 +108,7 @@ if __name__ == '__main__':
try:
import readline # NoQA
except ImportError:
- pass
+ readline = None
interactive_hook = getattr(sys, "__interactivehook__", None)
@@ -122,8 +122,9 @@ if __name__ == '__main__':
except:
pass
else:
- completer = rlcompleter.Completer(console.locals)
- readline.set_completer(completer.complete)
+ if readline is not None:
+ completer = rlcompleter.Completer(console.locals)
+ readline.set_completer(completer.complete)
repl_thread = REPLThread()
repl_thread.daemon = True