-
Notifications
You must be signed in to change notification settings - Fork 980
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
Use packaging.metadata to parse and validate upload metadata (Second try) #15631
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…etadata (pypi#14718)" (pypi#15630)" This reverts commit 7b00f6b.
Fixes WAREHOUSE-PRODUCTION-1R3.
dstufft
approved these changes
Mar 19, 2024
2 tasks
javanlacerda
pushed a commit
to javanlacerda/warehouse
that referenced
this pull request
Mar 25, 2024
…try) (pypi#15631) * Revert "Revert "Use packaging.metadata to parse and validate upload metadata (pypi#14718)" (pypi#15630)" This reverts commit 7b00f6b. * Cast version to string when enqueueing task Fixes WAREHOUSE-PRODUCTION-1R3. * Ignore empty string values when parsing metadata * Add test coverage
miketheman
added a commit
to miketheman/warehouse
that referenced
this pull request
Aug 28, 2024
We get `email-validator` from `wtforms`, but use it explicitly in our own code, so declare it a direct dependency in case `wtforms` ever drops it. Refs: pypi#15631 Signed-off-by: Mike Fiedler <[email protected]>
miketheman
added a commit
to miketheman/warehouse
that referenced
this pull request
Aug 29, 2024
We get `email-validator` from `wtforms`, but use it explicitly in our own code, so declare it a direct dependency in case `wtforms` ever drops it. Refs: pypi#15631 Signed-off-by: Mike Fiedler <[email protected]>
miketheman
added a commit
to miketheman/warehouse
that referenced
this pull request
Sep 9, 2024
We get `email-validator` from `wtforms`, but use it explicitly in our own code, so declare it a direct dependency in case `wtforms` ever drops it. Refs: pypi#15631 Signed-off-by: Mike Fiedler <[email protected]>
miketheman
added a commit
to miketheman/warehouse
that referenced
this pull request
Sep 11, 2024
We get `email-validator` from `wtforms`, but use it explicitly in our own code, so declare it a direct dependency in case `wtforms` ever drops it. Refs: pypi#15631 Signed-off-by: Mike Fiedler <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reverts #15630, bringing back #14718.
Fixes #15628, #14718 (comment) and WAREHOUSE-PRODUCTION-1R3.
The fixes are:
meta.version
returns apackaging.version.Version
, but our async task requires all args to be strings to serialize as JSON, so cast it to a string.twine
sends empty strings, but empty strings are never valid metadata field values, and fail metadata validation when we pass this topackaging.metadata.Metadata
. Therefore, when pre-parsing metadata from POST bodies, we drop all fields with empty string values.