Skip to content

Comments

Replace --python with --try-first-with#9413

Merged
radoering merged 1 commit intopython-poetry:mainfrom
hexmode:main
Aug 17, 2024
Merged

Replace --python with --try-first-with#9413
radoering merged 1 commit intopython-poetry:mainfrom
hexmode:main

Conversation

@hexmode
Copy link
Contributor

@hexmode hexmode commented May 13, 2024

If a tool like asdf provides a python that is first in the path, virtualenv does not use it even though it is the one
used to invoke poetry. Using --try-first-with (introduced in 20.3.0) allows poetry to point to the prefered python.

See https://virtualenv.pypa.io/en/latest/changelog.html#v20-3-0-2021-01-10
Resolves: #9278

@radoering
Copy link
Member

@hexmode Considering #9278 (comment), do you think this still makes sense?

Maybe, we should use --try-first-with instead of --python anyway because we always pass a path and do not need any discovery?

@hexmode
Copy link
Contributor Author

hexmode commented Aug 16, 2024

I would have to re-create my scenario, but, yes, using --try-first-with makes sense to me.

If a tool like asdf provides a python that is first in the path, virtualenv does not use it even though it is the one
used to invoke poetry.  Using --try-first-with (introduced in 20.3.0) allows poetry to point to the prefered python.

See https://virtualenv.pypa.io/en/latest/changelog.html#v20-3-0-2021-01-10
fixes python-poetry#9278
@radoering radoering merged commit 3175fb0 into python-poetry:main Aug 17, 2024
@github-actions
Copy link

This pull request 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 Sep 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

virtualenvs.prefer-active-python is not respected

2 participants