Skip to content

asyncio REPL is not working on Windows #118817

Description

@lschoe

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

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    on May 9, 2024
  2. changed the title [-]python -m asyncio fails on Windows [/-] [+]``asyncio REPL`` is not working on Windows[/+] on May 9, 2024
  3. added a commit that references this issue on May 9, 2024
  4. added a commit that references this issue on May 9, 2024
  5. added a commit that references this issue on May 9, 2024
  6. Eclips4 commented on May 9, 2024

    @Eclips4
    Member

    Thanks for the report!

  7. added a commit that references this issue on May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13only security fixes3.14bugs and security fixesOS-windowstype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions