Cap uvicorn below 1.0 - #42
Merged
Merged
Conversation
The spec was floor-only (>=0.23.0). jvspatial is the package that actually drives uvicorn -- api/server_run.py calls uvicorn.run with a config dict -- so a major release is free to rename or drop the kwargs passed there. The open range also let a resolver move an existing environment from uvicorn 0.44 to 0.52 between two installs of the same commit, with nothing in the diff to explain it. A cap keeps resolution inside a tested range without pinning consumers to an exact version, which a library should not do. Deliberately a range rather than ==: an exact pin in a published library propagates conflicts to every downstream that depends on anything else wanting uvicorn. Reproducibility for a deployment belongs in that deployment's lock/constraints file, not in this dependency list.
Benchmark comparisonThreshold: ±25% (informational, does not block merge)
|
11 tasks
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.
Type of Change
Summary
uvicornwas floor-only (>=0.23.0). This caps it below 1.0.jvspatial is the package that actually drives uvicorn —
api/server_run.py:124callsuvicorn.run(app_path, **uvicorn_config)— so a major release is free to rename or drop the kwargs passed there, and we would find out at a user's startup rather than in CI.The open range is not theoretical: it let a resolver move an existing environment from uvicorn 0.44 to 0.52 between two installs of the same commit, with nothing in any diff to explain the change. That is what prompted this.
Description
"uvicorn>=0.23.0"→"uvicorn>=0.23.0,<1.0.0", with the rationale in a comment beside it (matching the existingstarlettenote, which documents why it deliberately has no cap).Why a range and not
==. An exact pin in a published library propagates conflicts to every downstream that depends on anything else wanting uvicorn — the cure would be worse than the drift. Reproducibility for a given deployment belongs in that deployment's lock/constraints file, where it can be exact without constraining anyone else.Changes Made
pyproject.toml— cap + rationale comment.CHANGELOG.md—[Unreleased] / Changed.Checklist
tests/api/test_server_config.py+tests/api/test_server_env_integration.pygreen; pre-commit clean.Steps to Test
Questions or Concerns
If you would rather track uvicorn majors aggressively than cap them, the alternative is leaving it open and adding a scheduled CI job that installs with
--upgradeand runs the suite, so a breaking major surfaces as a failed job instead of a failed user startup. Happy to do that instead — the goal is that the version moves visibly, not that it never moves.Companion note: jvagent has no uvicorn dependency of its own to cap — it never imports it, and inherits this one transitively — so this is the only place the constraint belongs.