-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixestopic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
I expect this to raise a TimeoutError:
async def amain():
async with asyncio.timeout(-11):
await asyncio.sleep(0)
asyncio.run(amain())
Instead I have to add an extra asyncio.sleep(0)
to get a TimeoutError
async def amain():
async with asyncio.timeout(-11):
await asyncio.sleep(0) # does not raise CancelledError
await asyncio.sleep(0) # raises CancelledError
asyncio.run(amain())
Your environment
- CPython versions tested on:
- Operating system and architecture:
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixestopic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error