-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
While testing out type hints with mypy dealing with some of the customizations my group made to cpython 3.8.2, I was surprised and shocked that the type hints for stdlib live in a separate repo, instead of being distributed with the base interpreter.
Distributing the .pyi files with the base interpreter and individual projects should be done to reduce friction for end-users that customize cpython and other projects to meet their needs without having to jump through hoops to effectively maintain a duplicate type hints file for underlying implementations that implement the customizations. What will happen over time, I fear, is that the .pyi files will become crufty/incorrect or out of sync with the implementations as functions/constants are added/removed by other developers.
Tying the interface files to the project that they describe makes sense, intuitively and pragmatically and will result in less of a maintenance nightmare.
Please see this mypy issue for more details: python/mypy#8745 .