prompt-toolkit / prompt-toolkit/python-prompt-toolkit

Warning thrown: Corutine was never waited

Open
#1,891 3 comments 27 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
815
PR merge metrics
No merged PRs in 30d

Description

Sorry if this is not the place to ask but i'm getting a warning on prompt-toolkit but being thrown using ipdb.

I'm trying to use ipdb inside a flask application and im getting the following warning on every command or after pressing the autocomplete key:

ipdb>                                                                                                                                                                                                                  
/Users/gonzalo/.pyenv/versions/3.10.11/envs/boostup/lib/python3.10/site-packages/prompt_toolkit/application/application.py:1207: RuntimeWarning: coroutine 'Application.run_async.<locals>._run_async.<locals>.auto_flush_input' was never awaited                                                                                  
  await asyncio.wait(                                                                                                                                                                                                   
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
                                                                                                            
ipdb>

I have Python 3.10.11 with prompt_toolkit==3.0.47 installed and ipdb==0.13.13

Any ideas how to get rid of this warning?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at prompt_toolkit/application/application.py:1207 and reproduce the warning using ipdb inside a Flask application with Python 3.10.11, prompt_toolkit 3.0.47, and ipdb 0.13.13. Trace the auto_flush_input coroutine during commands and Tab completion; done means the RuntimeWarning no longer appears in the reported scenarios.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.