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 include Home-page with UNKNOWN value #3057

Merged
merged 1 commit into from Jan 30, 2022

Conversation

cdce8p
Copy link
Contributor

@cdce8p cdce8p commented Jan 28, 2022

Summary of changes

Similar to Download-URL, Home-page is handled as an optional field by PyPI. No need to include it in the package metadata if it's unknown. This will better support packages which choose to specify all urls inside project_urls.

pypa/warehouse - forklift/legacy.py

Reading a missing field is also not an issue. msg[field] will return None in these cases.

def _read_field_from_msg(msg: "Message", field: str) -> Optional[str]:
"""Read Message header field."""
value = msg[field]
if value == 'UNKNOWN':
return None
return value

Pull Request Checklist

@jaraco jaraco merged commit e996c28 into pypa:main Jan 30, 2022
@cdce8p cdce8p deleted the optional-home_page branch January 30, 2022 17:03
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.

None yet

2 participants