agronholm / agronholm/anyio

in py3.8+ the first asyncio.Task object is allocated with the same ID every time

Open
#324 16 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.