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 and poetry new could/should respect virtualenvs.prefer-active-python configuration option #7073

Closed
david-vicente opened this issue Nov 22, 2022 Discussed in #7059 · 1 comment · Fixed by #7100
Assignees
Labels
area/cli Related to the command line area/init Related to 'poetry init'/project creation area/ux Features and improvements related to the user experience kind/feature Feature requests/implementations

Comments

@david-vicente
Copy link

Discussed in https://github.com/orgs/python-poetry/discussions/7059

Originally posted by david-vicente November 19, 2022
Consider the following situation: I'm using pyenv to manage my python versions and want to start a new project using poetry.

I thought that if I ran

$ pyenv versions
* system
  3.11.0 
$ pyenv shell 3.11.0

Then using poetry to start a new project, like

$ poetry new myproject

would create a new folder with all the relevant stuff inside, and file pyproject.toml would be

[tool.poetry]
name = "myproject"
version = "0.1.0"
description = ""
authors = ["Me <my@email.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

notice the python version. However this is not the case as poetry new <project name> seems to ignore the active python version and go with the system one.

Is this the intended behavior? Shouldn't poetry new and poetry init take into consideration the active python version?

I'm aware of other issues with similar questions:

@finswimmer finswimmer added kind/feature Feature requests/implementations area/ux Features and improvements related to the user experience area/init Related to 'poetry init'/project creation area/cli Related to the command line labels Nov 22, 2022
@finswimmer finswimmer self-assigned this Nov 22, 2022
Copy link

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 Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/cli Related to the command line area/init Related to 'poetry init'/project creation area/ux Features and improvements related to the user experience kind/feature Feature requests/implementations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants