Skip to content

Uv migration#2686

Open
vpetersson wants to merge 3 commits intomasterfrom
uv-migration
Open

Uv migration#2686
vpetersson wants to merge 3 commits intomasterfrom
uv-migration

Conversation

@vpetersson
Copy link
Contributor

@vpetersson vpetersson commented Mar 9, 2026

Description

This PR migrates dependency management in containers from pip to uv.

Checklist

  • I have performed a self-review of my own code.
  • New and existing unit tests pass locally and on CI with my changes.
  • I have done an end-to-end test for Raspberry Pi devices.
  • I have tested my changes for x86 devices.
  • I added a documentation for the changes I have made (when necessary).

vpetersson and others added 2 commits March 9, 2026 20:07
Consolidate all Python dependencies from 7 requirements/*.txt files into
pyproject.toml dependency groups. Replace pip install with uv sync in all
Docker containers, using --system-site-packages for access to apt-installed
packages (python3-gi) and /opt/venv to survive volume mounts in dev/test.

Key changes:
- Add dependency groups: server, celery, websocket, viewer, wifi-connect,
  dev, test, host, local (plus existing dev-host, docker-image-builder)
- Bump cryptography 3.3.2→44.0.3, pyOpenSSL 19.1.0→25.1.0 for Python 3.11
- Update all Dockerfile templates to use uv sync with --only-group
- Install uv via COPY --from=ghcr.io/astral-sh/uv:latest (pip fallback for pi1/pi2)
- Add arm64 support to test Dockerfile (chromium from apt instead of Chrome for Testing)
- Switch Dependabot from pip to uv ecosystem
- Update bin/install.sh to parse pyproject.toml instead of requirements.host.txt
- Delete requirements/ directory

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Notable bumps:
- celery 5.2.2 → 5.6.2
- cryptography 44.0.3 → 46.0.5
- gunicorn 23.0.0 → 25.1.0
- pyzmq 23.2.1 → 27.1.0
- redis 7.1.0 → 7.3.0
- sh 1.8 → 2.2.2
- time-machine 2.15.0 → 3.2.0
- ruff 0.14.10 → 0.15.5
- selenium 4.36.0 → 4.41.0
- yt-dlp 2026.2.21 → 2026.3.3

Kept at current versions:
- Django 4.2.29 (LTS; 5.x/6.x are breaking upgrades)
- django-dbbackup 4.2.1 (5.x requires Django 5+)
- ansible-core 2.18.3 (used in install.sh)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vpetersson vpetersson requested a review from a team as a code owner March 9, 2026 20:15
Add back WORKDIR /usr/src/app in server, celery, and websocket
Dockerfiles that was lost during the uv migration. Without it,
containers crash on startup because CMD runs from / instead of
/usr/src/app. Also apply ruff formatting to utils.py and add a
wait step in the OpenAPI schema CI workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2026

@nicomiguelino
Copy link
Contributor

@vpetersson, thank you for creating a pull request. Let me test this thoroughly across all supported platforms.

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.

2 participants