Skip to content

Use uv as package manager#565

Merged
altf4arnold merged 5 commits intomainfrom
uv_update
Mar 6, 2026
Merged

Use uv as package manager#565
altf4arnold merged 5 commits intomainfrom
uv_update

Conversation

@Mortinat
Copy link
Contributor

@Mortinat Mortinat commented Mar 6, 2026

I know yet another package manager.
This one though seems now to be the main used one (see the 80k stars on the repo https://github.com/astral-sh/uv).

Once this pr is approved I will update all the package as the Django version is way too old.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the project’s Python dependency management from pip-tools/requirements*.txt to uv, consolidating dependency declarations into pyproject.toml and updating build/deploy workflows accordingly.

Changes:

  • Add pyproject.toml + uv.lock and remove setup.cfg + requirements*.txt inputs/outputs.
  • Update Docker build/run, Fabric deploy, and helper scripts to use uv sync / uv run.
  • Refresh developer documentation to reflect the new uv-based workflow.

Reviewed changes

Copilot reviewed 12 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
uv.lock New lockfile capturing resolved dependencies for uv.
pyproject.toml New source of truth for dependencies and tool config (pytest/flake8).
setup.cfg Removed in favor of pyproject.toml tool configuration.
requirements.txt Removed (previously pip-tools output).
requirements.in Removed (previously pip-tools input).
requirements-dev.txt Removed (previously pip-tools output).
requirements-dev.in Removed (previously pip-tools input).
requirements-prod.txt Removed (previously pip-tools output).
requirements-prod.in Removed (previously pip-tools input).
Dockerfile Switch image build/install flow to uv and run gunicorn via uv run.
fabfile.py Update deploy routine to use uv sync and uv run.
docker-compose.yml Update scheduled job command to run via uv.
build.sh Run migrations/static collection via uv in the container.
DEVELOPMENT.md Update local setup and dependency management docs for uv.
.gitignore Ignore .python-version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"djangorestframework",
"django-activity-stream",
"django-bootstrap4",
"django-constance",
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

incubator/settings.py enables constance.backends.database and sets CONSTANCE_BACKEND to the database backend, but pyproject.toml depends on plain django-constance (no [database] extra) and the lockfile contains no django-picklefield. This is likely to break at runtime when Constance tries to use its DB backend. Add the django-constance[database] extra (or explicitly add whatever backend dependency the DB backend requires) so the installed deps match the configured backend.

Suggested change
"django-constance",
"django-constance[database]",

Copilot uses AI. Check for mistakes.
FROM python:3.10-slim-buster
FROM python:3.10-slim-bookworm

COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

The Dockerfile pulls ghcr.io/astral-sh/uv using the mutable latest tag, which is a supply-chain risk. If that registry or tag is ever compromised, a malicious uv binary could be injected into your build, with the ability to influence dependency resolution and run in an environment that may have access to secrets or sensitive configuration. To reduce this risk, reference this image using an immutable identifier such as a specific version tag and preferably a content digest, and update it explicitly when you choose to upgrade.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

Is this file still relevant ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't even know what it's

@Minigrim0 Minigrim0 mentioned this pull request Mar 6, 2026
4 tasks
@altf4arnold altf4arnold merged commit 0fdcaa7 into main Mar 6, 2026
1 check passed
@altf4arnold altf4arnold deleted the uv_update branch March 6, 2026 21:42
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.

4 participants