Task was destroyed but it is pending!
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.7k
- Forks
- 206
- PR merge metrics
- No merged PRs in 30d
Description
The error message is telling us that a task was destroyed, but it's still pending. Specifically, we have a task with the name 'Task-1672902' that was in the middle of running the handle_messages() function at /usr/local/lib/python3.8/site-packages/quart/asgi.py:56. But for some reason, it got destroyed before it could complete.
The message:
Task was destroyed but it is pending!
task: <Task pending name='Task-1672902' coro=<ASGIHTTPConnection.handle_messages() running at /usr/local/lib/python3.8/site-packages/quart/asgi.py:56> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7feb66ff0190>()]>>
Environment:
- Python version: 3.8.12
- Quart version: 0.19.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported warning and the Quart entry point at /usr/local/lib/python3.8/site-packages/quart/asgi.py:56, where ASGIHTTPConnection.handle_messages() is running. Reproduce it with Python 3.8.12 and Quart 0.19.3, then trace the connection and task lifecycle; done means the reported pending-task warning no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100