Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up update-python3-dependencies #7234

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Speed up update-python3-dependencies #7234

merged 1 commit into from
Oct 9, 2024

Commits on Oct 9, 2024

  1. Speed up update-python3-dependencies

    The `make update-python3-dependencies` step is slow for two main
    reasons: container image layering and pip-compile.
    
    Switch to the new uv tool, which reimplements pip-compile in a much
    faster way. The output is basically the same, except the sorting is
    smarter (e.g. pytest comes before pytest-cov) and package names are
    properly normalized. We can also drop the `--allow-unsafe` because uv is
    entirely independent of setuptools and pip-tools.
    
    Because uv is independent of the system Python (it's pure Rust), we can
    run it on the host and outside the container, so no image rebuilding
    happens during the updates, it'll just be needed once afterwards.
    
    uv is still quite new to the Python ecosystem, but this allows us to
    begin using it without any lock-in, it should be trivial to swap back to
    pip-tools if needed.
    
    Overall `make update-python3-dependencies` now takes seconds to run
    instead of minutes \o/
    
    Refs <freedomofpress/securedrop-tooling#16>.
    legoktm committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    37bb2cf View commit details
    Browse the repository at this point in the history