typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

Merge requirements-tests.txt into pyproject.toml?

Open srittau opened this issue 6 months ago • 2 comments
trafficstars

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).

srittau avatar May 09 '25 16:05 srittau

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

Avasam avatar May 12 '25 07:05 Avasam

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.

Akuli avatar Jun 09 '25 21:06 Akuli