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

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

Merged
merged 1 commit into from
Aug 17, 2024
Merged

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
75 checks passed
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