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

Don't crash on 'check' when METADATA is missing #8926

Merged
merged 1 commit into from Sep 28, 2020

Conversation

uranusjr
Copy link
Member

Fix #8676.

Ideally I’d want to catch only corruption failure for that specific package and carry on with others, but that does not seem feasible without patching pkg_resources.

Since we already swallow corrupted metadata exceptions, it is probably not a terrible idea to swallow OSError anyway. Hopefully the importlib.metadata migration would provide a more useful way to handle these errors.

Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

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

Idk if we can/should have tests here.

@uranusjr
Copy link
Member Author

Me either (otherwise I’d attach a test). We don’t test the RequirementParseError case currently, fwiw.

@pradyunsg pradyunsg merged commit a3da6b2 into pypa:master Sep 28, 2020
@pradyunsg
Copy link
Member

Force-merged despite CI failures, since (1) the patch seems very safe, (2) no need to wait for 30+ minutes of CI and (3) reverts are cheap.

@uranusjr uranusjr deleted the dont-crash-on-check branch September 28, 2020 12:28
pradyunsg added a commit to pradyunsg/pip that referenced this pull request Oct 12, 2020
Don't crash on 'check' when METADATA is missing
pradyunsg added a commit to pradyunsg/pip that referenced this pull request Oct 12, 2020
Don't crash on 'check' when METADATA is missing
pradyunsg added a commit to pradyunsg/pip that referenced this pull request Oct 12, 2020
Don't crash on 'check' when METADATA is missing
pradyunsg added a commit to pradyunsg/pip that referenced this pull request Oct 12, 2020
Don't crash on 'check' when METADATA is missing
pradyunsg added a commit to pradyunsg/pip that referenced this pull request Oct 16, 2020
Don't crash on 'check' when METADATA is missing
pradyunsg added a commit to pradyunsg/pip that referenced this pull request Oct 16, 2020
Don't crash on 'check' when METADATA is missing
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2021
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.

'METADATA' crash during 'pip install'
2 participants