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

repo: handle invalid distributions gracefully #5645

Merged

Conversation

abn
Copy link
Member

@abn abn commented May 19, 2022

This change ensures that poetry does not bail out when encountering a bad distributions in sys_path. This behaviour is similar to how pip handles this today. In addition to ignoring these distributions, we also issue a warning log so users can choose to act on this.

Further, this change also handles a scenario where an empty path is present in the sys_path.

Additional commits exists in this PR to clean up related tests.

Resolves: #3628
Closes: #4702

@abn abn requested a review from a team May 19, 2022 13:01
Secrus
Secrus previously approved these changes May 19, 2022
@Secrus Secrus requested a review from a team May 19, 2022 13:31
src/poetry/repositories/installed_repository.py Outdated Show resolved Hide resolved
src/poetry/repositories/installed_repository.py Outdated Show resolved Hide resolved
src/poetry/repositories/installed_repository.py Outdated Show resolved Hide resolved
tests/repositories/test_installed_repository.py Outdated Show resolved Hide resolved
abn added 3 commits May 19, 2022 18:00
This change ensures that poetry does not bail out when encountering a
bad distributions in `sys_path`. This behaviour is similar to how `pip`
handles this today. In addition to ignoring these distributions, we
also issue a warning log so users can choose to act on this.

Further, this change also handles a scenario where an empty path is
present in the `sys_path`.
@neersighted neersighted merged commit 820c503 into python-poetry:master May 23, 2022
@abn abn mentioned this pull request Jun 6, 2022
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 Feb 29, 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.

"expected string or bytes-like object" on poetry install
3 participants