fix: pin all dependencies in the pyproject.toml file#2856
Draft
scottschreckengaust wants to merge 2 commits intoawslabs:mainfrom
Draft
fix: pin all dependencies in the pyproject.toml file#2856scottschreckengaust wants to merge 2 commits intoawslabs:mainfrom
scottschreckengaust wants to merge 2 commits intoawslabs:mainfrom
Conversation
* feat: pin dependencies from uv.lock before PyPI build When packages are published to PyPI, loose dependency specifiers (>=) allow transitive dependency versions to drift from the tested lockfile resolution. This causes issues when tools like `uvx` resolve fresh against PyPI and install different (potentially breaking) versions. Add a `pin-dependencies` command to release.py that reads uv.lock and rewrites pyproject.toml dependencies to exact (==) version pins before building the wheel. The pinning happens only during the CI build step, so the git repo keeps loose deps for development flexibility while published packages install the exact tested versions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: pin ALL dependencies (direct + transitive) from uv.lock Update pin-dependencies to add all 125+ transitive dependencies from uv.lock as direct deps in pyproject.toml with == pins, not just the 9 original direct deps. This ensures every package in the resolved dependency tree is pinned to the exact tested version. For tool packages running in isolated uvx environments, this eliminates all version drift — both direct and transitive. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Scott Schreckengaust <345885+scottschreckengaust@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2856 +/- ##
==========================================
- Coverage 91.38% 91.37% -0.01%
==========================================
Files 1014 1014
Lines 74946 74946
Branches 12044 12044
==========================================
- Hits 68486 68483 -3
Misses 3990 3990
- Partials 2470 2473 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
This pull request is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the "backlog" label. |
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.
Fixes
Summary
uvx's emphemoral virtual environment doesn't read theuv.lockthat is distributed to PyPi. This updates thepyproject.tomldynamically to pinned versions from theuv.lock.Changes
Run the script prior to distributing releases.
User experience
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change? (Y/N)
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.