typeshed
typeshed copied to clipboard
Merge requirements-tests.txt into pyproject.toml?
Apart from this being the "modern way" to do things, this would allow us to use dependency groups. Nowadays we have a hodgepodge of dependencies in requirements-tests.txt for various purposes. This not only install unnecessary installs, it can also make unrelated tests fail if there is a problem with a more exotic requirement.
That said, splitting the requirements into groups would be a second step (and issue).
I actually have a wip branch on this! I was waiting for pip 25.1 to release with support for dependency groups. https://github.com/Avasam/typeshed/pull/40 (although I was playing around with a bit more than just moving deps)
However, it would further delay installing ts_lib as local editable install because afaik there's currently no way to do that in a way that's compatible with both pip and uv.
- https://github.com/python/typeshed/pull/12806#issuecomment-2705286911
- https://github.com/astral-sh/uv/issues/9683#issuecomment-2705480073
- https://github.com/astral-sh/uv/issues/9258#issuecomment-2705491878
I'm not a big fan of deleting requirements-tests.txt. The fact is that it works, and it is by far the simplest solution: to understand it, you only need to know pip and read one simple text file. You don't need to know what is an editable install, for example.
Also, pip install -r requirements.txt is the standard way to set up a dev environment for a Python project.
That said, if I'm the only maintainer who prefers simple and minimal over "the modern way", feel free to proceed.