You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, asyncpg is untyped and has to be ignored as an import when using mypy. Because of this, I created an asyncpg-stubs package generated from stubgen that I use in my own projects as a git dependency, but it would be great to have these in the main library (and verified by the developers). If this is something that is desired, I would be willing to create the initial PR.
Reacted by Jason Heiss, Steve Dignam, Bartłomiej Szostek, Tasko Olevski, Tuukka Mustonen, Edgar Ramírez Mondragón, Juhan Oskar Hennoste, Min-Min, Wes Hargrove, Tomas and 8 more
Reacted by Victor, Bjarke Felbo, Daniel Smith, Aelin, Vishes, retnikt, Sasha, EGrunzkeCvg, Håkon Åmdal, Derek Kulinski and 25 more
Yeah, we would love to see typing support in asyncpg.
Reacted by Bryan Forbes, Krzysztof Kosyl, Charlie Denton, Richard Février, Timur Makarov, PidgeyBE, Yanxi Wang, Chris Cummings, Min-Min, Andres Soto and 1 more
Any update on whether asyncpg-stubs is planned to get merged into asyncpg?
Reacted by Derek Kulinski, Felipe Rosa, Richard Février, Antoni Szych, Eugene, Chris Cummings, Aleksi Lahikainen, Giulio Carlassare, Don Freeman, Nick Khitrov and 6 more
@1st1#577 seems a bit too big to merge and review, but there is lots of stuff in that PR that can easily be merged and will help reduce the noise around the more critical/problematic changes. To give an example def _check_conn_validity(self, meth_name: str) -> None:.
Does it make sense to start splitting off some of those contributions into separate PRs so that they can be merged and users can benefit from improved IDE suggestions as well as get #577 more manageable (and therefore more mergeable)?
@elprans I know maintainers time is limited, but you just made a release and therefore seem the most active.
I would like to dedicate time to getting type annotations for asyncpg to at least partially work, but it seems there is limited time to review PRs. Is there anyway that would make it feasible for you to review PRs that add type stubs without changing features of the package?
Activity
1st1 commentedon May 18, 2020
Yeah, we would love to see typing support in asyncpg.
cstigen commentedon Jul 1, 2022
Any update on whether asyncpg-stubs is planned to get merged into asyncpg?
DanielNoord commentedon Jul 30, 2024
@1st1 #577 seems a bit too big to merge and review, but there is lots of stuff in that PR that can easily be merged and will help reduce the noise around the more critical/problematic changes. To give an example
def _check_conn_validity(self, meth_name: str) -> None:.Does it make sense to start splitting off some of those contributions into separate PRs so that they can be merged and users can benefit from improved IDE suggestions as well as get #577 more manageable (and therefore more mergeable)?
DanielNoord commentedon Oct 22, 2024
@elprans I know maintainers time is limited, but you just made a release and therefore seem the most active.
I would like to dedicate time to getting type annotations for
asyncpgto at least partially work, but it seems there is limited time to review PRs. Is there anyway that would make it feasible for you to review PRs that add type stubs without changing features of the package?elprans commentedon Oct 22, 2024
Happy to review if the typing-adding PR is split. It's nearly impossible to confidently review #577 as-is.
DanielNoord commentedon Oct 22, 2024
Cool! I made a first PR to test the waters here: #1197
Let me know if there is anything you need from my side.
nicholas-johnson-techxcel commentedon May 19, 2025
The Pool in asyncpg-stubs does not match the Pool in this package, they need to be unified.
nicholas-johnson-techxcel commentedon May 19, 2025
I can pull request this and bring this up to py313 syntax with py.typed if you are willing to accept.
dnk8n commentedon May 4, 2026
One year later, is this still being considered?