Skip to content

Create third-party stubs for s2clientprotocol #10371

@jrtknauer

Description

@jrtknauer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    stubs: requestOUTDATED! Request to add stubs for a new package to typeshed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions