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

Skip dist if metadata does not have a valid name #11353

Merged
merged 1 commit into from
Aug 10, 2022

Conversation

uranusjr
Copy link
Member

@uranusjr uranusjr commented Aug 5, 2022

Fix #11352.

@@ -2,6 +2,15 @@
from typing import Any, Optional, Protocol, cast


class BadMetadata(ValueError):
Copy link
Member

Choose a reason for hiding this comment

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

This should also derive from PipError?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure what the convention is. This is supposed to be somewhat internal to the metadata subpackage and shouldn’t be uncaught.

@hroncok
Copy link
Contributor

hroncok commented Aug 8, 2022

Thanks for writing this. I was just about to have a look :)

@uranusjr
Copy link
Member Author

uranusjr commented Aug 9, 2022

Any thoughts on this, fellow maintainers?

@uranusjr uranusjr requested a review from pradyunsg August 9, 2022 09:40
@sbidoul
Copy link
Member

sbidoul commented Aug 9, 2022

I'm good with this. A test would be nice.

@sbidoul
Copy link
Member

sbidoul commented Aug 9, 2022

Does this warrant a patch release before Python 3.11 is released?

@pfmoore
Copy link
Member

pfmoore commented Aug 9, 2022

I'd be cautious about trying to get another pip release in, as 3.11rc1 has been released. I wouldn't even consider it without getting RM approval, TBH.

@uranusjr
Copy link
Member Author

uranusjr commented Aug 9, 2022

This probably does not affect those using pip in a “normal” Python environment, but I’m not sure if having a release would make things easier for Fedora.

@hroncok
Copy link
Contributor

hroncok commented Aug 9, 2022

This probably does not affect those using pip in a “normal” Python environment, but I’m not sure if having a release would make things easier for Fedora.

I plan to patch our pip as soon as this is merged. But I am not sure how likely this is to happen elsewhere. A release before Python 3.11 final is released might be the safest option.

@uranusjr
Copy link
Member Author

Merging this now, we can always modify exception inheritance later.

@uranusjr uranusjr merged commit dc8f3a8 into pypa:main Aug 10, 2022
@uranusjr uranusjr deleted the importlib-metadata-ignore-bad-name branch August 10, 2022 08:43
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2022
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.

Bad metadata: TypeError: expected string or bytes-like object, got 'NoneType'
5 participants