Skip to content

Possibility for inclusion of grpc-stubs? #10020

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

Closed
shabbyrobe opened this issue Apr 7, 2023 · 4 comments
Closed

Possibility for inclusion of grpc-stubs? #10020

shabbyrobe opened this issue Apr 7, 2023 · 4 comments
Labels
stubs: request OUTDATED! Request to add stubs for a new package to typeshed

Comments

@shabbyrobe
Copy link

I've been maintaining some stubs I wrote for grpc over at https://github.com/shabbyrobe/grpc-stubs/. People have been requesting they be added to typeshed for a while.

I'm not sure if they would be appropriate but I thought I'd reach out anyway to see. The grpc package itself has some type hinting, but it's patchy, coarse-grained and incomplete. I'm not sure if that disqualifies these stubs or not based on the criteria in CONTRIBUTING.. The stubs I have are a bit more thorough. grpc supports Python 3.7 and up, as with typeshed, so that criteria is at least met.

Looks like I'd have to clean the stubs up quite a bit to match the requirements outlined in CONTRIBUTING, but what else beyond that might need to happen to make this possible?

Also, given people who are using these stubs are probably already using typeshed, what is the potential for mess-making if the stubs suddenly start showing up in both places for folks?

@Akuli
Copy link
Collaborator

Akuli commented Apr 7, 2023

I think we should just move the stubs here. If the type hinting in grpc eventually becomes good enough, we can easily deprecate the typeshed stub package (we have done this many times with other projects, and we have automated most of it). Just make a pull request of what you have, so we can see how much changes are needed to pass our CI :)

Users might be confused about how there will be both types-grpcio (typeshed package) and grpc-stubs (your old project). To help with this, once the stubs are in typeshed, you could publish one more version of grpc-stubs with a deprecation message in README that tells users to install types-grpcio instead.

If you know a few somewhat large open source projects that use your stubs, you could add a few to mypy_primer. This way we will see how they are affected by any pull requests to the stubs.

@hauntsaninja
Copy link
Collaborator

You could also issue a release of grpc-stubs that has no stubs but has types-grpcio as a dependency, and that way your existing users could still get updates.

@AlexWaygood AlexWaygood added the stubs: request OUTDATED! Request to add stubs for a new package to typeshed label Apr 29, 2023
@AlexWaygood
Copy link
Member

I'm closing this issue for now, but only because the question has been answered. A PR adding these stubs to typeshed would be very welcome :)

@shabbyrobe
Copy link
Author

Sounds good, just been getting my house in order a bit before submitting. There were some outstanding issues I wanted to work through first, also hoping to give the aio stubs (which have been a bit of a problem child for a while) some time to percolate since I gave them some attention. I'd rather hold off submitting until those are a bit more stable, which will hopefully save some trouble, but as soon as I'm a bit more confident I'll open up the PR discussed earlier.

Thanks everyone for the input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stubs: request OUTDATED! Request to add stubs for a new package to typeshed
Projects
None yet
Development

No branches or pull requests

4 participants