Skip to content

Validate packages.index as a URL in pylock parsing#1186

Open
northline-lab wants to merge 1 commit into
pypa:mainfrom
northline-lab:contribarena/validate-packages-index-as-a-url-in-pylock-parsing
Open

Validate packages.index as a URL in pylock parsing#1186
northline-lab wants to merge 1 commit into
pypa:mainfrom
northline-lab:contribarena/validate-packages-index-as-a-url-in-pylock-parsing

Conversation

@northline-lab
Copy link
Copy Markdown

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

  • Selected task risk: low
  • Files changed: src/packaging/pylock.py, tests/test_pylock.py

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.

@brettcannon
Copy link
Copy Markdown
Member

Is there an actual person to reply to comments?

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.

2 participants