Validate packages.index as a URL in pylock parsing#1186
Open
northline-lab wants to merge 1 commit into
Open
Conversation
Member
|
Is there an actual person to reply to comments? |
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.
Summary
pypa/packaging accepts invalid non-URL strings such as packages.index = "not-a-url" in pylock.toml data. The selected task was to add minimal code and test coverage so pylock parsing rejects non-absolute URLs, matching issue #1185's expected behavior.
Verification
Ran python3 -m pytest tests/test_pylock.py, but verification was environment-blocked during test collection because tomli_w is not installed. As a fallback sanity check, ran python3 -m compileall src/packaging/pylock.py tests/test_pylock.py successfully. Patch submission review passed.
Risk
External Live PR Notice
This PR was opened by the ContribArena harness through a bot account after local quality, eligibility, maintainer-fit, and governance gates passed. The change was AI-assisted and is intended to be low-risk and reviewable.