Add module to manage Python versions using uv#11537
Add module to manage Python versions using uv#11537mriamah wants to merge 93 commits intoansible-collections:mainfrom
Conversation
…t will be installed
…ll with explicite version
…ng integration test
…ut relying on uv behavior
…xist in latest state
…o patch version is available
| state: | ||
| description: | ||
| - Desired state of the specified Python version. | ||
| - | |
There was a problem hiding this comment.
This will not have effect you are likely imagining: the content will be rendered as a single paragraph block, the newlines will be reduced to single spaces. If you want to make multiple paragraphs, make each one of them a list item under description.
There was a problem hiding this comment.
Thanks for the review. I actually did that to avoid a linting error since the paragraphs are over 160 charaters.
| EXAMPLES = r""" | ||
| - name: Install Python 3.14 | ||
| community.general.uv_python: | ||
| version: "3.14" |
There was a problem hiding this comment.
It would be nice to add a note in the description of version to remind users that when version is major or major.minor, the number must be enclosed in quotes so it is parsed as string (and not as an int or a float).
There was a problem hiding this comment.
Actually, whether the user puts quotes or not, the value given will always be converted to a string. I just made some examples with versions in quotes or without to show that it can be written in both forms, but I didn't see that my examples could also be interpreted this way, I will add more examples to clarify this. Thanks for pointing this out.
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
8c1a765 to
d28c9b7
Compare
6c93ad8 to
e853a6f
Compare
d28c9b7 to
f8bc6e8
Compare
00d8ec2 to
05c100c
Compare
SUMMARY
Introduces a new module
uv_pythonto manage Python versions using theuv pythonsubcommand from the Astral uv package manager. The module allows users to install, remove, and upgrade patch version of Python interpreters managed byuv.Design Decisions
3.12,3.12.3,3.15.0a5.>=3.12,<3.13,cpython@3.12).check_modesupport.diff_mode.ISSUE TYPE
COMPONENT NAME
uv_pythonADDITIONAL INFORMATION
Example Usage
This was recently published as a collection mriamah.uv.python in Ansible galaxy.