Problem
The schemas package (mozilla-nimbus-schemas) manages its Python dependencies with Poetry. We are standardizing the repo's Python projects on uv, which is now the best supported way to manage Python dependencies (faster installs, native Dependabot support). This follows the cirrus migration (#16174).
Schemas is a published package (PyPI + npm) that ships generated JSON schema data files, so the migration also swaps the build path.
Change
- Convert
schemas/pyproject.toml from [tool.poetry] to PEP 621 [project] + the uv build backend ([tool.uv.build-backend]), which bundles the generated mozilla_nimbus_schemas/schemas data into both wheel and sdist. Fix the license to a valid SPDX identifier (MPL-2.0).
- Replace
poetry.lock with uv.lock.
- Install dependencies via uv in
schemas/Dockerfile (venv, copied to the dev stage; the project is installed editable so its in-package tests import).
- Makefile:
poetry build → uv build, poetry version → uv version; drop the poetry run prefix. Publish path (twine for PyPI, yarn for npm) is unchanged.
- Switch the
/schemas Dependabot entry from pip to uv (the npm entry stays).
deploy-schemas.yml: compare the actual version value between commits instead of grepping the diff for the word "version", so structural pyproject edits (like this migration) don't misfire a deploy.
Acceptance criteria
make schemas_check passes (black, ruff, schema-generation diff, pytest).
make schemas_build produces a wheel and sdist containing the generated schema data files.
- Dependabot tracks
uv.lock via the uv ecosystem.
- The deploy workflow only runs on an actual version change.
┆Issue is synchronized with this Jira Task
Problem
The schemas package (
mozilla-nimbus-schemas) manages its Python dependencies with Poetry. We are standardizing the repo's Python projects on uv, which is now the best supported way to manage Python dependencies (faster installs, native Dependabot support). This follows the cirrus migration (#16174).Schemas is a published package (PyPI + npm) that ships generated JSON schema data files, so the migration also swaps the build path.
Change
schemas/pyproject.tomlfrom[tool.poetry]to PEP 621[project]+ the uv build backend ([tool.uv.build-backend]), which bundles the generatedmozilla_nimbus_schemas/schemasdata into both wheel and sdist. Fix the license to a valid SPDX identifier (MPL-2.0).poetry.lockwithuv.lock.schemas/Dockerfile(venv, copied to the dev stage; the project is installed editable so its in-package tests import).poetry build→uv build,poetry version→uv version; drop thepoetry runprefix. Publish path (twine for PyPI, yarn for npm) is unchanged./schemasDependabot entry frompiptouv(the npm entry stays).deploy-schemas.yml: compare the actualversionvalue between commits instead of grepping the diff for the word "version", so structural pyproject edits (like this migration) don't misfire a deploy.Acceptance criteria
make schemas_checkpasses (black, ruff, schema-generation diff, pytest).make schemas_buildproduces a wheel and sdist containing the generated schema data files.uv.lockvia theuvecosystem.┆Issue is synchronized with this Jira Task