[Pandas-dev] Decoupling type stubs for the public API from the pandas distribution

Irv Lustig irv at princeton.com
Tue Nov 23 11:22:14 EST 2021


I discovered this feature of typing:
https://www.python.org/dev/peps/pep-0561/#stub-only-packages

The idea is that for a package like pandas, we can have a separate package
"pandas-stubs" that would contain the type stubs for pandas.  We wouldn't
have to worry about including a `py.typed` file or `.pyi` files in our
standard pandas distribution - all typing for the public API would be in
the separate package.  That would allow pandas typing for the public API to
be maintained separately (different GitHub repo).  We could start by just
copying over what Microsoft created at
https://github.com/microsoft/python-type-stubs/tree/main/pandas and then we
maintain it as a separate repo, which could be installed via pip and conda.

Any thoughts on whether we should consider doing this?

-Irv
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/pandas-dev/attachments/20211123/9ec5e254/attachment.html>


More information about the Pandas-dev mailing list