Conversation
This file contains hidden or 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
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.
Pylock.from_dict()currently acceptsupload-timevalues with no timezone or with a nonzero UTC offset for archives, sdists, and wheels. It also serializes those values unchanged. The pylock specification requires the upload date and time to be recorded in UTC; the sdist and wheel fields reference the same requirement.Validate that the datetime's UTC offset is zero through the existing
_get_aspath. Invalid values now raisePylockValidationErrorwith their full field context, such aspackages[0].wheels[0].upload-time. The existing validation API rejects data that violates the specification.The parameterized tests cover all three artifact types with timezone-naive values, positive and negative offsets, UTC, a named zero-offset timezone, and omitted upload times. Valid values retain their round-trip representation.
Validation on Windows with Python 3.13.13:
packaging.pylockcoverage: 100% statements and branches (332 statements, 116 branches).git diff --checkpasses.AI assistance: OpenAI Codex prepared the change, executed the tests, and performed a separate review of the specification and validation behavior.