python-trio / trio-typing

Type hints for Trio and related projects
Other
27 stars 13 forks source link

Merge `trio-typing` into `trio`? #75

Open Zac-HD opened 1 year ago

Zac-HD commented 1 year ago

It's been a while since https://github.com/python-trio/trio/issues/543 was opened, and the typing ecosystem has matured considerably.

I think we should aim to distribute type annotations as part of Trio directly, and retire this package.

oremanj commented 1 year ago

Strong agree. Once mypy supports TypeVarTuple we can probably do it without a plugin.

Zac-HD commented 1 year ago

Cross-linking, that's python/mypy/labels/topic-pep-646 and in particular https://github.com/python/mypy/issues/12280.

On the Trio side, we've considered this before and should take an incremental approach over multiple small PRs.

A5rocks commented 8 months ago

Well, trio==0.23.0 has type hints so I think this issue is done? Reopen if I'm misinterpreting!

Zac-HD commented 8 months ago

I think it is! It looks like we've also released a type-annotated version of outcome, and async_generator is not needed on supported Python versions, so maybe we can archive this whole repo?

🤔 maybe we want to make one last release to emit warnings and tag with Development Status :: 7 - Inactive?

A5rocks commented 8 months ago

I think some people might still want the plugin while mypy doesn't have TypeVarTuple ... and I haven't used this much so idk if there's much else here, but maybe other stuff.

Zac-HD commented 8 months ago

Ah, right, that's been merged but not released yet - https://github.com/python/mypy/pull/16354 will be in mypy 1.7 🙂

jakkdl commented 8 months ago

I agree we want a warning release at some point, and would be nice with an open issue to track that, so I'll reopen this for now and we can then revisit it once we've incorporated TypeVarTuple in trio.

jakkdl commented 8 months ago

Looking through https://github.com/python-trio/trio-typing#whats-in-the-box I think trio implements everything other than the stuff that needs TypeVarTuple. We could probably copy over some tests from here

jakkdl commented 3 months ago

mypy 1.7 (and 1.8) is released, so I'll try and get around to making a final release and maybe run some tests to double check.

jakkdl commented 1 week ago

I ran the test suite without the plugin installed, which caught https://github.com/python-trio/trio/pull/3022 But otherwise the only properly missing thing is Nursery.start not being properly typed due to https://github.com/python/mypy/issues/16522