Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge trio-typing into trio? #75

Open
Zac-HD opened this issue Mar 14, 2023 · 10 comments
Open

Merge trio-typing into trio? #75

Zac-HD opened this issue Mar 14, 2023 · 10 comments

Comments

@Zac-HD
Copy link
Member

Zac-HD commented Mar 14, 2023

It's been a while since python-trio/trio#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
Copy link
Member

oremanj commented Mar 28, 2023

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

@Zac-HD
Copy link
Member Author

Zac-HD commented Mar 29, 2023

Cross-linking, that's python/mypy/labels/topic-pep-646 and in particular python/mypy#12280.

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

@A5rocks
Copy link

A5rocks commented Nov 4, 2023

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

@A5rocks A5rocks closed this as completed Nov 4, 2023
@Zac-HD
Copy link
Member Author

Zac-HD commented Nov 4, 2023

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
Copy link

A5rocks commented Nov 4, 2023

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
Copy link
Member Author

Zac-HD commented Nov 4, 2023

Ah, right, that's been merged but not released yet - python/mypy#16354 will be in mypy 1.7 🙂

@jakkdl
Copy link
Member

jakkdl commented Nov 4, 2023

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 jakkdl reopened this Nov 4, 2023
@jakkdl
Copy link
Member

jakkdl commented Nov 4, 2023

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
Copy link
Member

jakkdl commented Mar 13, 2024

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
Copy link
Member

jakkdl commented Jun 25, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants