Switch to uv#1
Merged
Merged
Conversation
Switch to uv for project management. Switch the build system to hatchling. Switch tox to using uv and moved its config into pyproject.toml. Split up deps into areas of concern.
mdavidbennett
force-pushed
the
switch-to-uv
branch
6 times, most recently
from
June 3, 2026 16:39
d87362c to
8710731
Compare
mdavidbennett
marked this pull request as ready for review
June 3, 2026 16:45
There was a problem hiding this comment.
Pull request overview
This PR migrates the project to uv-based dependency management and consolidates tooling configuration into pyproject.toml, while modernizing the codebase for Python >=3.10 and switching linting/formatting to Ruff. It also updates CI workflows and developer documentation to match the new workflow.
Changes:
- Migrate packaging/build config to Hatch (
hatchling+hatch-vcs) and remove legacysetup.py/tox.ini/.flake8. - Adopt Ruff (via pre-commit) and apply Python 3.10+ typing/modernization changes across the codebase.
- Rework GitHub Actions to run tox via
uv, and update docs to reflect the new developer workflow.
Reviewed changes
Copilot reviewed 38 out of 40 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tox.ini | Removed legacy tox configuration (migrated into pyproject.toml). |
| setup.py | Removed legacy setuptools shim (migrated to Hatch). |
| pyproject.toml | Centralizes build metadata, dependency groups, ruff/mypy/pytest/coverage/tox config. |
| .flake8 | Removed flake8 config (superseded by Ruff). |
| .pre-commit-config.yaml | Switches hooks from black/isort/flake8 to Ruff + updates pinned revisions. |
| .vscode/settings.json | Updates Python formatter to Ruff. |
| .gitignore | Adds common caches and uv/ruff venv/cache paths. |
| .github/workflows/tox.yml | Removes old tox workflow. |
| .github/workflows/tests.yml | Adds new tox-via-uv test workflow matrix. |
| .github/workflows/pre-commit.yml | Adds CI job to run style checks via tox/pre-commit using uv. |
| .github/workflows/build-docs.yml | Updates docs build workflow to use uv+tox and newer action pins. |
| .github/workflows/deploy-docs.yml | Pins deploy-pages action to a specific revision. |
| docs/source/index.md | Adds new development docs page to the docs TOC. |
| docs/source/development/testing.md | Updates test/style instructions to use uv run tox / uv run pre-commit. |
| docs/source/development/getting_started.md | Updates dev setup instructions for uv workflow and project layout. |
| docs/source/development/docs.md | Adds instructions for building docs via tox (uv). |
| docs/source/_ext/linkcode_res.py | Simplifies linespec construction. |
| docs/Makefile | Removed Make-based docs build entrypoint. |
| docs/make.bat | Removed Windows batch docs build entrypoint. |
| tests/test_shell.py | Updates CLI invocation expectation due to click behavior change. |
| tests/test_controllers.py | Makes property access explicit to satisfy newer linters. |
| tests/stores/test_vault.py | Reformats long assertion for style/formatter compliance. |
| tests/stores/test_local.py | Aligns error type expectations with code’s OSError handling. |
| tests/state_managers/test_local.py | Updates mocked open() expectations and error types to match implementation. |
| src/certwrangler/utils.py | Updates typing to modern unions and simplifies open() usage. |
| src/certwrangler/types.py | Moves to stdlib typing.Annotated and modern type syntax. |
| src/certwrangler/stores/vault.py | Modernizes typing (PEP 604 / builtins generics) and open() usage. |
| src/certwrangler/stores/local.py | Simplifies exception handling and modernizes typing / open() usage. |
| src/certwrangler/state_managers/local.py | Refactors helpers, modernizes typing, simplifies open() usage. |
| src/certwrangler/state_managers/dummy.py | Modernizes typing in the dummy state manager API. |
| src/certwrangler/solvers/lexicon.py | Modernizes typing for provider options/config builder. |
| src/certwrangler/solvers/edgedns.py | Modernizes typing for HTTP helpers and payload/response shapes. |
| src/certwrangler/shell.py | Modernizes typing for click callbacks and arguments; improves exception chaining. |
| src/certwrangler/schema_migrations.py | Uses collections.abc.Callable and modern generic syntax. |
| src/certwrangler/models.py | Modernizes typing broadly; adds exception chaining for clearer tracebacks. |
| src/certwrangler/metrics.py | Modernizes typing and simplifies dict iteration patterns. |
| src/certwrangler/dns.py | Simplifies TXT/CNAME checks and removes now-unneeded helper/type import. |
| src/certwrangler/daemon.py | Modernizes typing for thread init and signal handlers. |
| src/certwrangler/controllers.py | Modernizes typing and simplifies tuple construction; updates optional/union syntax. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mdavidbennett
force-pushed
the
switch-to-uv
branch
from
June 4, 2026 16:27
3875a07 to
e78906a
Compare
jfrederi-akamai
self-requested a review
June 4, 2026 18:04
Bump starlette to v1.0.1 for CVE-2026-48710 Bump click to 8.2 and update tests for change in exit code when running without args.
mdavidbennett
force-pushed
the
switch-to-uv
branch
from
June 4, 2026 21:02
e78906a to
c9dbd38
Compare
Comment on lines
15
to
+17
| outcome = CliRunner().invoke(cli) | ||
| assert outcome.exit_code == 0 | ||
| # Running without args exits 2 after click 8.2 | ||
| assert outcome.exit_code == 2 |
| "F", # pyflakes | ||
| "I", # isort | ||
| "SIM", # flake8-simplify | ||
| # TODO: enable after dropping python 3.9 in a new PR. |
|
|
||
| ## Bumping Dependencies | ||
|
|
||
| Github actions, pre-commit, and uv dependencies can be bumped by running the following: |
jfrederi-akamai
approved these changes
Jun 10, 2026
jfrederi-akamai
left a comment
Contributor
There was a problem hiding this comment.
This looks great! Thanks for all the work on this 🙂
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switch to UV for project management.
Switch to ruff for linting and style checks and applied the changes introduced with this.
Consolidate tox and linter config to pyproject.toml.
Bump all python deps and tooling deps.
Update docs with changes.
Drop python 3.9.
Small update to tests due to some changes in click.
Capped python compatibility to 3.13 since I ran into some failing tests with the free-thread build of 3.14. Will tackle that in a follow up PR.