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

Create third-party stubs for s2clientprotocol #10371

Closed
jrtknauer opened this issue Jun 27, 2023 · 1 comment · Fixed by #10372
Closed

Create third-party stubs for s2clientprotocol #10371

jrtknauer opened this issue Jun 27, 2023 · 1 comment · Fixed by #10372
Labels
stubs: request OUTDATED! Request to add stubs for a new package to typeshed

Comments

@jrtknauer
Copy link
Contributor

Background

Blizzard originally published the s2client-proto Protocol Buffers in 2017. The Protocol Buffers themselves are largely frozen in time, as updates to the StarCraft II API ceased with the end of DeepMind's involvement - but Blizzard automation continues to package the Python modules generated from the Protocol Buffers and publish this package to PyPi as s2clientprotocol. This work predates mypy-protobuf, which leaves the package without stubs.

Proposal

Given the sc2client-proto repository is in maintenance mode, I would like to generate stubs from the Protocol Buffers using:

The generated stubs could then be published here on typedshed under stubs/s2clientprotocol.

I have already spiked the issue, and the stubs are correctly generated with the caveat that they will fail some of typeshed's stub tests (I believe this is a consequence of stubbing Protocol Buffers in general with mypy-protobuf, but the stubs themselves appear to be functional with both pyright and mypy).

Alternatives

I have already opened a PR to have the stubs generated and published with the s2clientprotocol package - but I have my concerns regarding the publication environment and how much effort the automation maintainers are willing to invest to ensure my changes continue to work. In the case that the PR goes nowhere, I intend to open a PR against typeshed to have the stubs published here instead. However, given the stubs do not pass typeshed stub tests on the merits of them being stubs for generated Python via mypy-protobuf, I am equally concerned for their uptake here.

@jrtknauer
Copy link
Contributor Author

jrtknauer commented Jun 27, 2023

PR #10372 has been opened to facilitate discussion regarding the failing third party stubs test and what can be done about it.

@AlexWaygood AlexWaygood added the stubs: request OUTDATED! Request to add stubs for a new package to typeshed label Jul 8, 2023
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

Successfully merging a pull request may close this issue.

2 participants