Skip to content

Conversation

@DhavalGojiya
Copy link
Contributor

@DhavalGojiya DhavalGojiya commented Nov 19, 2025

Description

This PR migrates the project from Pipenv to uv, while preserving the exact locked dependency versions.

Feature Added

  • Moved from Pipenv to uv for dependency management.
  • Removed dynamic PyPI versioning that was previously handled by setuptools-scm. We can now create a PR during release time (Bump x.y.z Release) or directly push a commit to master before release.
  • Removed setuptools as a base dependency for Pysolr since the required backend tools are installed automatically when running build commands like python -m build or uv build.
  • Removed tox.ini. Tests are now run using uv, which is much faster and requires minimal configuration.
  • Added pre-commit as a dev dependency group, making it easy to run pre-commit locally using:
    uv run pre-commit run --all-files
  • Added the uv-lock pre-commit hook to ensure the environment stays in sync with our codebase. It also helps the pre-commit CI bot detect errors when the environment goes out of sync.

Removed Files

  • Pipfile
  • Pipfile.lock
  • setup.py
  • tox.ini

Rename

  • .github/workflows/tox.yml --> .github/workflows/ci.yml
  • Job name tox --> test

@DhavalGojiya
Copy link
Contributor Author

DhavalGojiya commented Nov 19, 2025

Been working on this continuously for the last 7 hours 😅

setuptools as a build backend is really horrible. I wasted 4 hours just trying to get the configuration right and finally gave up, switching to the Hatchling backend instead.

Hatchling requires zero configuration, provides sensible defaults, and is extremely fast builds complete in just a few milliseconds.

EDIT: Let's stick with the setuptools build backend for now.

pyproject.toml Outdated
Comment on lines 2 to 3
build-backend = "hatchling.build"
requires = [ "hatchling" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, should we stick with the setuptools backend for the first PR?

@DhavalGojiya DhavalGojiya force-pushed the feat/project-migrate-to-uv branch from 854d6c3 to 0ab7ce3 Compare November 20, 2025 12:41
@DhavalGojiya
Copy link
Contributor Author

@cclauss Done :)

@DhavalGojiya DhavalGojiya requested a review from cclauss November 20, 2025 12:47
Copy link
Contributor

@cclauss cclauss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very impressive! Thanks.

@cclauss cclauss merged commit c208419 into django-haystack:master Nov 20, 2025
9 checks passed
@DhavalGojiya DhavalGojiya deleted the feat/project-migrate-to-uv branch November 21, 2025 06:29
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.

3 participants