Question about accepted names for type stub–only packages #1503
-
Forgive me if I ramble a bit; I want to trace my thought process while trying to figure this out. I'm currently making a package only with type stubs for another library and by default assumed the name of it should be
No mention there of the
No mention of I guess my ultimate questions from all this are the following:
Sorry for the long-winded post about such a small thing, but I'd appreciate any clarification for what seems like a small inconsistency. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
One point to understand here is the difference between distributions (the things you install) and packages (the things you import, or the names of directories in site-packages). PEP 561 is clear that the package must be named |
Beta Was this translation helpful? Give feedback.
-
Here's another part of the history. Once upon a time, most stub distributions (and of course packages therein) were named Then at some point, typeshed wanted to ship stubs for its third party packages. Because this is sort of "official", we wanted a way to convey that, ideally by a separate PyPI namespace, which at the time looked like it might have gotten implemented. But we settled for a prefix, in the hope that This then turned into user-facing advice to look for See also: |
Beta Was this translation helpful? Give feedback.
-
This is information that I would have liked to find 4 years ago when I started to create and publish stubs for MicroPython. Also I wonder why Now I find that while I apparently got the name conventions the wrong-way around, everything does work. So should I morph and upset the current users ? |
Beta Was this translation helpful? Give feedback.
One point to understand here is the difference between distributions (the things you install) and packages (the things you import, or the names of directories in site-packages). PEP 561 is clear that the package must be named
widget-stubs
, and that's what type checkers will look for on the file system. However, the distribution, the thing you install, is conventionally calledtypes-widget
. It's unfortunate that the two names don't match, but perhaps difficult to fix now.