narrow-vegetable-37489
10/06/2021, 7:01 PM[mypy].extra_requirements
to requriements.txt
(as recommended in https://github.com/pantsbuild/pants/pull/12597), our PEXs have increased in size by roughly 20MB each. This by itself doesn't sound like much but, seeing how they were "only" ~70MB before, it ends up being a significant percentage. Why it happens is quite understandable, but preferably type stubs would be skipped in PEXs since (to me) they don't seem to add much value there. Not sure if this is an oversight or simply a con to the pros of 12597 🙂hundreds-father-404
10/06/2021, 7:04 PM.pyi
files
Definitely open to exploring alternativeshundreds-father-404
10/06/2021, 7:07 PMInstead, [mypy].extra_requirements should only be used for what is needed to run MyPy itself, such as MyPy plugins. It should not include type stubsI still think this is true, and it's important for the tool lockfile. But we could explore a new option like
[mypy].type_stubs
!
It'd be preferable to "Keep It Simple" by not needing that, so would love to understand the particular situation better firstnarrow-vegetable-37489
10/06/2021, 7:09 PMgrpc-stubs
, types-contextvars
, types-decorator
, types-Flask
, types-freezegun
, types-futures
, types-jwt
, types-mock
, types-protobuf
, types-python-dateutil
, types-pytz
, types-PyYAML
, types-redis
and types-requests
.
While installing them I noticed that mypy was installed as well (maybe due to one of the stubs having it as a dependency?), maybe that could be the main suspect. As you said, the stubs themselves are rather minimal.hundreds-father-404
10/06/2021, 7:10 PMnarrow-vegetable-37489
10/06/2021, 7:12 PMnarrow-vegetable-37489
10/06/2021, 7:34 PMgrpc-stubs
is the culprit for the MyPy dependency.hundreds-father-404
10/06/2021, 7:41 PMnarrow-vegetable-37489
10/06/2021, 7:54 PMnarrow-vegetable-37489
10/06/2021, 7:54 PMhundreds-father-404
10/07/2021, 4:55 PMsetup.py
! https://github.com/shabbyrobe/grpc-stubs/search?q=mypy
Iiuc, it's a "dev dependency" for them, so they should put it in requirements-dev.txt
Would you be open to opening an issue / submitting a patch?hundreds-father-404
10/08/2021, 10:41 PMnarrow-vegetable-37489
10/08/2021, 11:31 PM