Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asyncio REPL is not working on Windows #118817

Closed
lschoe opened this issue May 9, 2024 · 1 comment
Closed

asyncio REPL is not working on Windows #118817

lschoe opened this issue May 9, 2024 · 1 comment
Labels
3.13 bugs and security fixes 3.14 new features, bugs and security fixes OS-windows type-bug An unexpected behavior, bug, or error

Comments

@lschoe
Copy link

lschoe commented May 9, 2024

Bug report

Bug description:

Running the asyncio REPL with Python 3.13b1 on Windows gives

>py -3.13  -m asyncio
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Berry\AppData\Local\Programs\Python\Python313\Lib\asyncio\__main__.py", line 126, in <module>
    readline.set_completer(completer.complete)
    ^^^^^^^^

due to missing readline package.

Easy to fix by removing

try:
import readline # NoQA
except ImportError:
pass

and inserting import readline # NoQA before line 121:
try:
import rlcompleter
except:
pass
else:
completer = rlcompleter.Completer(console.locals)
readline.set_completer(completer.complete)

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Linked PRs

@lschoe lschoe added the type-bug An unexpected behavior, bug, or error label May 9, 2024
@Eclips4 Eclips4 added 3.13 bugs and security fixes 3.14 new features, bugs and security fixes OS-windows labels May 9, 2024
@Eclips4 Eclips4 changed the title python -m asyncio fails on Windows asyncio REPL is not working on Windows May 9, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 9, 2024
(cherry picked from commit c3643a1)

Co-authored-by: Kirill Podoprigora <[email protected]>
gvanrossum pushed a commit that referenced this issue May 9, 2024
(cherry picked from commit c3643a1)

Co-authored-by: Kirill Podoprigora <[email protected]>
@Eclips4
Copy link
Member

Eclips4 commented May 9, 2024

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes 3.14 new features, bugs and security fixes OS-windows type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants