Skip to content

Conversation

@Otto-AA
Copy link
Collaborator

@Otto-AA Otto-AA commented Oct 26, 2025

Use uv for dependencies and packaging. Fixes #448

I've tried to use the lowest bounds possible for dependencies, so that users of mutmut do not encounter conflicts with their own requirements (but for libcst it is one of the newest versions to support 3.14).

As uv always checks if everything is up-to-date, you only need to run uv run pytest to setup the venv + dependencies and run the tests. Similarly for e.g. uv run mutmut --version.

Building works with uv build. Versioning with uv version (which updates pyproject.toml and uv.lock). Publishing should work with uv publish but I did not test this part.

Added files:

  • .python-version (3.10; version that uv uses by default for the virtual environment)
  • pyproject.toml
  • uv.lock (with the lower bounds of the dependencies, so we do not accidentally break backwards-compatibility while developing)

Removed files:

  • MANIFEST.in (covered mostly automatically + source-include in pyproject.toml)
  • Makefile (Looked outdated, so I guess you did not use it anyway)
  • tox.ini (Looked outdated, so I guess you did not use it anyway)
  • requirements.txt & test_requirements.txt (now in pyproject.toml)
  • setup.cfg (looked outdated; the pytest testpaths is now in pyproject.toml)
  • setup.py (mostly moved to pyproject.toml; however, tag and release utils are gone)

@Otto-AA Otto-AA requested a review from boxed October 26, 2025 16:06
@Otto-AA
Copy link
Collaborator Author

Otto-AA commented Oct 26, 2025

Instead of locking the lowest dependencies we could also switch to newer dependencies locally and use --resolution lowest in the CI. Not sure if we would want to run the CI then with each python version two times, once with lowest and once with highest dependency versions.

@boxed
Copy link
Owner

boxed commented Nov 6, 2025

Why the move to a src based layout?

@Otto-AA
Copy link
Collaborator Author

Otto-AA commented Nov 6, 2025

Mainly because uv uses the src layout as the default for packaged applications, so it was a little but simpler to follow the docs. Could be changed back to the flat layout, if you prefer that

It looks like pytest only supports '-p=no:randomly' since v8.0.0.
For backwards compatibility, we now use '-p', 'no:randomly'
@boxed boxed merged commit 72260eb into main Nov 19, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setup.py CLI is deprecated

3 participants