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

[Feature Request] "poetry init" to read .python-version to autodetect default Python version #2019

Closed
btegs opened this issue Feb 11, 2020 · 2 comments
Labels
kind/feature Feature requests/implementations

Comments

@btegs
Copy link

btegs commented Feb 11, 2020

If pyenv created a .python-version file inside of the current directory through pyenv local X.XX (where X.XX is the version of course), there should be a check in poetry init to read the .python-version file if it exists and if the user did not specify a version (just hit enter or left blank), the creation of the pyproject.toml will set the python version under [tool.poetry.dependencies] to the version set in that file. You could also have it show the version loaded from the file as the default version in the interactive questions.

This would be an excellent feature for a future release. :-)

@btegs btegs added the kind/feature Feature requests/implementations label Feb 11, 2020
@btegs btegs changed the title [Feature Request] "poetry init" to read .python-version to define Python version [Feature Request] "poetry init" to read .python-version to define Python version if none given Feb 11, 2020
@btegs btegs changed the title [Feature Request] "poetry init" to read .python-version to define Python version if none given [Feature Request] "poetry init" to read .python-version to autodetect default Python version Feb 11, 2020
@finswimmer
Copy link
Member

At Poetry we try to avoid implementations specific for third-party tools. But maybe it's possible to implement it as a plugin. Or you give #4852 a try. Maybe this works as well :)

Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations
Projects
None yet
Development

No branches or pull requests

2 participants