Skip to content

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
@twoertwein twoertwein marked this pull request as ready for review December 11, 2021 23:22
@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.

3 participants