in py3.8+ the first asyncio.Task object is allocated with the same ID every time
Open
asyncio
bug
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 260
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 19
Description
This is a problem in anyio because TaskInfo's `__eq__` goes on to compare dead object IDs
```python
>>> async def current_task():
... return anyio.get_current_task()
...
>>> t = anyio.run(current_task)
>>> u = anyio.run(current_task)
>>> t == u
True
>>> t.id == u.id
True
```
Contributor guide
Assessment
This issue has not been assessed yet.