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

Respect virtualenvs.in-project setting, if .venv is found in project folder #2771

Merged
merged 7 commits into from Sep 23, 2020

Conversation

finswimmer
Copy link
Member

@finswimmer finswimmer commented Aug 5, 2020

At the moment, when there is a folder called .venv within the project folder, poetry will use it as the path to the venv regardless whether virtualenvs.in-project is set to true or not. This leads to confusions as described in #1770 and #2756.

With this PR poetry will check if virtualenvs.in-project is set to true if it finds a .venv folder.

Closes: #1770
Closes: #2756

Copy link
Member

@abn abn left a comment

Couple of comments. Also, would be good to cover these cases in test cases to avoid any regression.

poetry/utils/env.py Outdated Show resolved Hide resolved
tests/installation/test_chef.py Outdated Show resolved Hide resolved
@finswimmer finswimmer requested a review from abn Aug 5, 2020
tests/utils/test_env.py Outdated Show resolved Hide resolved
tests/utils/test_env.py Outdated Show resolved Hide resolved
docs/docs/configuration.md Outdated Show resolved Hide resolved
@finswimmer finswimmer force-pushed the issue-1770-in-project-setting branch from 868e822 to 72b88e3 Compare Sep 21, 2020
finswimmer and others added 2 commits Sep 21, 2020
Co-authored-by: Arun Babu Neelicattu <arun.neelicattu@gmail.com>
@finswimmer finswimmer requested a review from abn Sep 21, 2020
Copy link
Member

@abn abn left a comment

Minor suggestions. Otherwise looks good.

poetry/utils/env.py Outdated Show resolved Hide resolved
tests/utils/test_env.py Outdated Show resolved Hide resolved
@finswimmer finswimmer requested a review from abn Sep 22, 2020
Copy link
Member

@abn abn left a comment

Missed the documentation in the last pass.

docs/docs/configuration.md Outdated Show resolved Hide resolved
docs/docs/configuration.md Outdated Show resolved Hide resolved
abn
abn approved these changes Sep 23, 2020
@abn abn merged commit 81b2774 into python-poetry:master Sep 23, 2020
@sdispater sdispater mentioned this pull request Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Poetry says that "environment seems to be broken" all the time About environment mangement and .venv folder
2 participants