Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Loop.call_later(0) and Loop.call_later(-1) return a uvloop.loop.Handle and not an asyncio.TimerHandle

Open
#482 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Start in uvloop/loop.pyx at lines 1327-1328 and compare the behavior of Loop.call_later(0) and Loop.call_later(-1) with vanilla asyncio. Done means both uvloop calls return an asyncio.TimerHandle rather than a uvloop.loop.Handle, including when PYTHONASYNCIODEBUG is enabled.

Written by the indexing model from the issue text.

Description

  • uvloop version: master
  • Python version: 3.10
  • Platform: ubuntu
  • Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: yes
  • Does uvloop behave differently from vanilla asyncio? How?: yes
Python 3.10.5 (main, Jun 11 2022, 16:53:24) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import asyncio
>>> import uvloop
>>> uvloop.new_event_loop().call_later(-1, lambda: None)
<Handle <lambda>>
>>> asyncio.new_event_loop().call_later(-1, lambda: None)
<TimerHandle when=79332.145640902 <lambda>() at <stdin>:1>
>>> 

the bug is here:
https://github.com/MagicStack/uvloop/blob/5926386f81ea49903db9d5095058787ed91cff3d/uvloop/loop.pyx#L1327-L1328

Dominant language
Cython
Stars
11.9k
Forks
615
PR merge metrics
No merged PRs in 30d

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.

More from MagicStack/uvloop

All issues in MagicStack/uvloop

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.