-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Stubs for zstd #9483
Comments
Sounds like you didn't add a In general, we prefer if type information comes with the packages themselves, so the ideal would be for zstd itself to distribute stubs. If the zstd maintainers are unwilling to add types, however, typeshed would be happy to accept them. |
Btw, https://github.com/indygreg/python-zstandard I think is a little better maintained and ships with a py.typed |
I checked and zstd is distributed as a single .so file, which means it actually cannot be typed with a py.typed file; see python/typing#1333. The options are:
|
As I don't know what's the developer's perspective regarding the issue and how the library is being used I wouldn't take the risk of turning it into an actual package, considering the unexpected side-effects it can have. I also don't want to wait for the issue to be fixed. I'll make the PR to add it to typeshed then. Thanks for the help! |
zstd is an extension library written in C for Python. I'd like to add stub files for it. However, I don't know whether I should make a pull request on their repo or add them to typeshed.
I'd like to make a PR on their repo, the issue is I don't know how to provide stub files along with the module itself. I tried to add the stub files in the
src/
directory, both aszstd.pyi
and__init__.pyi
, then I tried to add these files to thepackage_data
section in thesetup.py
file. Nonetheless, the stubs seem to get ignored in all cases; testing on a project I have which depends on zstd, I keep getting:Is it even possible to ship those .pyi directly with the package? If so, how can I do so? Or should I just add them to typeshed anyway? Thanks!
The text was updated successfully, but these errors were encountered: