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

fix check for in-project-venv #7977

Merged
merged 1 commit into from
May 23, 2023

Conversation

dimbleby
Copy link
Contributor

looks like #7792 was a bit careless, confusing two things

  • it rightly replaced two "is in-project-venv enabled?" checks with "is in-project-venv enabled, OR not explicitly configured but the directory exists?"
  • it wrongly replaced two "is in-project-venv enabled AND the directory already exists?" checks in the same way

this undoes those mistakes

fixes #7957

Copy link
Member

@radoering radoering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a test feasible?

@radoering radoering added impact/backport Requires backport to stable branch backport/1.5 labels May 21, 2023
@dimbleby
Copy link
Contributor Author

unclear how to test.

test_activate_with_in_project_setting_does_not_fail_if_no_venvs_dir() executes the code path but the reason that it shows no problem is that the mocking check_output_wrapper() does not know that python -c ... is trying to call a non-existent python.

@radoering radoering merged commit 846aee3 into python-poetry:master May 23, 2023
poetry-bot bot pushed a commit that referenced this pull request May 23, 2023
radoering pushed a commit that referenced this pull request May 23, 2023
@dimbleby dimbleby deleted the in-project-venv branch May 23, 2023 08:48
@manugarri
Copy link

maybe a way to test this would be to have an end to end test? create a new poetry environment with the flag set to true?

Copy link

github-actions bot commented Mar 3, 2024

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 Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
impact/backport Requires backport to stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Poetry 1.5 fails to install dependencies
3 participants