adorable-engine-71736
10/07/2021, 6:02 PM[mypy].extra_requirements
.
I updated to 2.7.0 and added a lockfile (which contains my stub deps)
The mypy PEX has the stub deps, afaict
When i run typecheck
now it says that the stubs are not installed. I would really rather not add the stubs as runtime deps as they are not, so wondering if/how to get the old behaviour working againhundreds-father-404
10/07/2021, 6:20 PMadorable-engine-71736
10/07/2021, 6:22 PMadorable-engine-71736
10/07/2021, 6:23 PMadorable-engine-71736
10/07/2021, 6:24 PMadorable-engine-71736
10/07/2021, 6:27 PMhundreds-father-404
10/07/2021, 6:30 PM[mypy].extra_type_stubs
option?
Having it there, rather than in extra_requirements
, would still solve the issues that were motivating https://github.com/pantsbuild/pants/pull/12597
And the "extra" to speak to how you can still use normal runtime deps. This augments any of those
(apologies if i sound critical, not meaning too, just trying to explain the issue)Not at all, we love feedback on things like this! Thank you for advocating it and for being thoughtful in how you do so
adorable-engine-71736
10/07/2021, 6:33 PMadorable-engine-71736
10/07/2021, 6:33 PMadorable-engine-71736
10/07/2021, 6:33 PMpip install somepackage[mypy]
hundreds-father-404
10/07/2021, 6:34 PMadorable-engine-71736
10/07/2021, 6:34 PMextra_type_stubs
would be goodadorable-engine-71736
10/07/2021, 6:35 PMhundreds-father-404
10/07/2021, 6:38 PMpython_distribution
you build has an extras
called [mypy]
which will optionally include the type stubs the project depends on?
I think related, I am wondering if a better solution here is for us to have first-class distinction between type-stub only deps vs. normal deps. Like that python_requirement_library
tracks that. Such that MyPy can install everything, but other contexts like Pytest and packaging ignore those onesadorable-engine-71736
10/07/2021, 6:41 PMfast-nail-55400
10/07/2021, 6:41 PMadorable-engine-71736
10/07/2021, 6:41 PMadorable-engine-71736
10/07/2021, 6:42 PMa
, b
and c
adorable-engine-71736
10/07/2021, 6:42 PMa
would doadorable-engine-71736
10/07/2021, 6:42 PMpip install a
adorable-engine-71736
10/07/2021, 6:42 PMadorable-engine-71736
10/07/2021, 6:42 PMpip install a[test]
adorable-engine-71736
10/07/2021, 6:43 PMadorable-engine-71736
10/07/2021, 6:43 PMpip install a[mypy]
adorable-engine-71736
10/07/2021, 6:43 PMb
and c
and each should be able to maintain a separate set of deps for each contextadorable-engine-71736
10/07/2021, 6:46 PMadorable-engine-71736
10/07/2021, 6:47 PMadorable-engine-71736
10/07/2021, 6:48 PMadorable-engine-71736
10/07/2021, 6:48 PMhundreds-father-404
10/07/2021, 6:49 PM[mypy].extra_type_stubs
. That more holistic rework of type stubs would require much more design work and be harder to implementadorable-engine-71736
10/07/2021, 6:50 PMadorable-engine-71736
10/07/2021, 6:51 PMextra_type_stubs
?adorable-engine-71736
10/07/2021, 6:51 PMhundreds-father-404
10/07/2021, 6:52 PMadorable-engine-71736
10/07/2021, 6:53 PMadorable-engine-71736
10/07/2021, 6:54 PMhundreds-father-404
10/07/2021, 6:56 PMadorable-engine-71736
10/07/2021, 6:59 PMhundreds-father-404
10/08/2021, 10:40 PMadorable-engine-71736
10/09/2021, 12:50 AMadorable-engine-71736
10/09/2021, 3:33 PMadorable-engine-71736
10/09/2021, 3:33 PMadorable-engine-71736
10/09/2021, 3:33 PMhundreds-father-404
10/09/2021, 3:34 PMhundreds-father-404
10/09/2021, 3:36 PM./pants_from_sources
, which involves compiling the Rust engine which can be really slow
(After this commit is merged, we will publish the wheels for the commit so you can run the commit before an official release)adorable-engine-71736
10/09/2021, 3:38 PMhundreds-father-404
10/09/2021, 3:39 PMadorable-engine-71736
10/09/2021, 3:40 PMadorable-engine-71736
10/09/2021, 3:41 PMhundreds-father-404
10/09/2021, 3:43 PMpants_from_sources
script, which allows us to test locally on any repository