-
-
Notifications
You must be signed in to change notification settings - Fork 469
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
Support uv --override option (#668) #1015
Open
idlsoft
wants to merge
1
commit into
astral-sh:main
Choose a base branch
from
idlsoft:uv_overrides
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+120
−12
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -265,3 +265,50 @@ fn test_autosync_remember() { | |
werkzeug==3.0.1 | ||
"###); | ||
} | ||
|
||
#[test] | ||
fn test_overrides() { | ||
// enforce werkzeug==2.3.8 when flask==3.0.0 requires Werkzeug>=3.0.0 | ||
|
||
let space = Space::new(); | ||
space.init("my-project"); | ||
|
||
rye_cmd_snapshot!(space.rye_cmd().arg("add").arg("werkzeug==2.3.8").arg("--override").arg("--no-sync"), @r###" | ||
success: true | ||
exit_code: 0 | ||
----- stdout ----- | ||
Initializing new virtualenv in [TEMP_PATH]/project/.venv | ||
Python version: [email protected] | ||
Added werkzeug==2.3.8 as override dependency | ||
|
||
----- stderr ----- | ||
"###); | ||
|
||
rye_cmd_snapshot!(space.rye_cmd().arg("add").arg("flask==3.0.0").arg("colorama==0.4.6"), @r###" | ||
success: true | ||
exit_code: 0 | ||
----- stdout ----- | ||
Added flask==3.0.0 as regular dependency | ||
Added colorama==0.4.6 as regular dependency | ||
Reusing already existing virtualenv | ||
Generating production lockfile: [TEMP_PATH]/project/requirements.lock | ||
Generating dev lockfile: [TEMP_PATH]/project/requirements-dev.lock | ||
Installing dependencies | ||
Done! | ||
|
||
----- stderr ----- | ||
Built 1 editable in [EXECUTION_TIME] | ||
Resolved 9 packages in [EXECUTION_TIME] | ||
Downloaded 8 packages in [EXECUTION_TIME] | ||
Installed 9 packages in [EXECUTION_TIME] | ||
+ blinker==1.7.0 | ||
+ click==8.1.7 | ||
+ colorama==0.4.6 | ||
+ flask==3.0.0 | ||
+ itsdangerous==2.1.2 | ||
+ jinja2==3.1.2 | ||
+ markupsafe==2.1.3 | ||
+ my-project==0.1.0 (from file:[TEMP_PATH]/project) | ||
+ werkzeug==2.3.8 | ||
"###); | ||
} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this maybe be a warning? Don't know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would ignore an explicit instruction to overwrite a dependency, I feel like it should be treated as an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a question of design, I don't know, on one hand the project is a pyproject.toml file which can be interpreted by standard python tools, not just Rye. And those tools would ignore everything inside
tool.rye
anyway. Maybe error when rye is managing it is good yeah.