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

DOC: local py.typed for users #44228

Merged
merged 7 commits into from Dec 17, 2021
Merged

DOC: local py.typed for users #44228

merged 7 commits into from Dec 17, 2021

Conversation

twoertwein
Copy link
Member

@twoertwein twoertwein changed the title DOC: local py.typed for development and users DOC: local py.typed for users Oct 29, 2021
@simonjayhawkins simonjayhawkins added Docs Typing type annotations, mypy/pyright type checking labels Oct 29, 2021
@simonjayhawkins simonjayhawkins added this to the 1.4 milestone Oct 29, 2021
@twoertwein
Copy link
Member Author

Starting with 1.4, it might be useful to slowly start advertising pandas's built-in type annotations (before pandas becomes a py.typed library). Specifically, I can imagine informing the maintainers of https://github.com/microsoft/pylance-release They have often pandas type issues as pylance ships the Microsoft type stubs.

Could maybe even have a note in the whatsnew?

@jreback
Copy link
Contributor

jreback commented Oct 30, 2021

happy to have a section in the whats new and the docs as well

@jreback
Copy link
Contributor

jreback commented Nov 14, 2021

can you merge master

@twoertwein
Copy link
Member Author

@jreback green'ish, doc seems to fail on master as well

@twoertwein
Copy link
Member Author

I don't think it makes sense to advertise experimenting with a local py.typed at the moment. People who will test it will be swamped in error messages. I tested it with my own code: many functions return a Union instead of using overloads (read_csv, basically all functions taking inplace, and indexing with list-like vs. scalars).

I think the earliest it makes sense to advertise experiments with py.typed is with 2.0 (when we can make most arguments keyword-only arguments: makes most overloads possible).

@twoertwein twoertwein marked this pull request as draft December 11, 2021 21:38
@jreback jreback merged commit c99cf86 into pandas-dev:master Dec 17, 2021
@jreback
Copy link
Contributor

jreback commented Dec 17, 2021

thanks @twoertwein this is good.

@twoertwein twoertwein deleted the pytyped branch March 9, 2022 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants