Skip to content
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

uv python pin should support writing to a uv.toml or pyproject.toml #4970

Open
zanieb opened this issue Jul 10, 2024 · 6 comments
Open

uv python pin should support writing to a uv.toml or pyproject.toml #4970

zanieb opened this issue Jul 10, 2024 · 6 comments
Assignees
Labels
needs-design Needs discussion, investigation, or design

Comments

@zanieb
Copy link
Member

zanieb commented Jul 10, 2024

We need to design the schema for this data. Probably at uv.python-version or uv.python.default-version.

@T-256
Copy link
Contributor

T-256 commented Jul 11, 2024

Then, should it also be top-level command uv pin? since it tries to manage project/workspace directly.

@zanieb
Copy link
Member Author

zanieb commented Jul 11, 2024

That's a reasonable question. I'm not sure. I don't love it at the top-level since it's not obvious what we're pinning.

@zanieb
Copy link
Member Author

zanieb commented Jul 24, 2024

I duped myself, #4359 covers reading from the configuration file.

@charliermarsh
Copy link
Member

(At least figure out the rough design prior to the release.)

@edmorley
Copy link
Contributor

edmorley commented Dec 11, 2024

I'm slightly concerned this will lead to more fragmentation of where third party ecosystems (such as Heroku, GHA setup-python, Dependabot, ...) will need to check for Python versions when bootstrapping an environment.

If there was a field in pyproject.toml that was guaranteed in the upstream spec to be a single Python version (either X.Y.Z or X.Y) rather than a multiple major version range, then I'd be fine with the ecosystem consolidating around that, but as-is the existing pyproject.toml requires-python field isn't suitable for bootstrapping purposes, and so the .python-version file is the next best thing available - and pretty widely accepted at this point.

@zanieb
Copy link
Member Author

zanieb commented Dec 12, 2024

... as-is the existing pyproject.toml requires-python field isn't suitable for bootstrapping purposes, and so the .python-version file is the next best thing available - and pretty widely accepted at this point.

Agreed. That's why we've delayed implementing this. Unfortunately, we're getting quite a bit of confusion from users. I'm not sure how we'll address that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-design Needs discussion, investigation, or design
Projects
No open projects
Status: No status
Development

No branches or pull requests

4 participants