Repository navigation
feat(python): use uv.lock by default - #8311
Merged
helderco merged 5 commits intoSep 10, 2024
Merged
Conversation
helderco
force-pushed
the
helder/dev-4476-python-use-uvlock-by-default
branch
2 times, most recently
from
September 8, 2024 18:43
6223192 to
6bf42c1
Compare
helderco
marked this pull request as ready for review
September 9, 2024 10:45
helderco
force-pushed
the
helder/dev-4476-python-use-uvlock-by-default
branch
from
September 9, 2024 22:10
6bf42c1 to
75b29f7
Compare
Contributor
Author
|
This one's ready. I added two change logs (there's a precedence for this). It wanted to split the upgrade to Python 3.12 in a separate PR but was rushed for time to get this by 0.13, so it was much easier to make both changes together. |
TomChv
approved these changes
Sep 10, 2024
TomChv
left a comment
Member
There was a problem hiding this comment.
Lot of good changes in this PR! Love it!
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
helderco
force-pushed
the
helder/dev-4476-python-use-uvlock-by-default
branch
from
September 10, 2024 11:06
75b29f7 to
28530dc
Compare
This was referenced Sep 10, 2024
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.
Closes #8309
Closes #8310
Use
uv.lockby default in new Dagger Modulesdagger initnow creates auv.lockfile instead of arequirements.lockfile, which provides a simpler workflow with uv when developing:To migrate an existing Dagger Module using
requirements.lock, touv.lock:Note
The above command will not preserve the pinned versions in
requirements.lock. There’s not yet a way to do it automatically, but there’s a workaround in the meantime:requirements.locktotool.uv.constraint-dependencies.uv lock.tool.uv.constraint-dependencies.To go back to the previous behavior and replace
uv.lockwithrequirements.lock:If both files exist,
uv.lockwill take precedence.To know more, read about managing projects with uv, and Astral’s uv: Unified Python packaging blog post for more on what uv can do for Python users.
Modules run in Python 3.12 by default
The base image that runs Module Functions is now running Python 3.12 by default. If you need to go back to 3.11, either change
requires-python = ">=3.11"inpyproject.toml, or create a.python-versionfile with3.11as the content.TODO: Updates to the documentation website will follow in a separate PR.