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
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?
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.
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.
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.
Activity
Akuli commentedon 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) andgrpc-stubs(your old project). To help with this, once the stubs are in typeshed, you could publish one more version ofgrpc-stubswith a deprecation message in README that tells users to installtypes-grpcioinstead.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 commentedon Apr 7, 2023
You could also issue a release of
grpc-stubsthat has no stubs but hastypes-grpcioas a dependency, and that way your existing users could still get updates.AlexWaygood commentedon Apr 29, 2023
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 commentedon Apr 30, 2023
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
aiostubs (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!