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

Include python-version in pyproject.toml #11697

Closed
tomaszbk opened this issue Feb 21, 2025 · 2 comments
Closed

Include python-version in pyproject.toml #11697

tomaszbk opened this issue Feb 21, 2025 · 2 comments
Labels
question Asking for clarification or support

Comments

@tomaszbk
Copy link

Question

Wouldn't it be cleaner to include the python version to use in the pyproject.toml file, instead of creating a separate .python-version file?

Platform

No response

Version

No response

@tomaszbk tomaszbk added the question Asking for clarification or support label Feb 21, 2025
@Gankra
Copy link
Contributor

Gankra commented Feb 21, 2025

This comment by Charlie I think summarizes the situation well:

The .python-version file is not quite obsolete with requires-python -- they're subtly different. requires-python is the range of versions supported by your project. .python-version is the exact version you want to use when developing. For example, if you're working on a library, your requires-python might be >= "3.10". But when developing on your machine, you might want to use 3.12.4 by default -- so you'd set that in a .python-version.

Since these two values are different, and pyproject one should ideally be looser, I think this continues to be something we don't plan to change.

@Gankra Gankra closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

3 participants