Repository navigation
feat(pypi): support PEP 691 JSON Simple API responses - #1
Open
Aniket1827 wants to merge 1 commit into
Open
Aniket1827 wants to merge 1 commit into
Aniket1827 wants to merge 1 commit into
Conversation
Some package indexes return JSON for Simple API pages even when `text/html` is requested. Extend `parse_simpleapi_html` to detect JSON responses and parse them via a new `_parse_simpleapi_json` helper, handling package file lists, index pages, yanked entries, and `core-metadata`/`dist-info-metadata`. Add unit tests for JSON sdist, wheel with metadata, yanked entries, and index parsing.
Aniket1827
force-pushed
the
akurkute-clean
branch
from
November 19, 2026 10:58
a5d21d7 to
e68af62
Compare
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.
Some package indexes return JSON for Simple API pages even when
text/htmlis requested. Extendparse_simpleapi_htmlto detect JSON responses and parse them via a new_parse_simpleapi_jsonhelper, handling package file lists, index pages, yanked entries, andcore-metadata/dist-info-metadata.Add unit tests for JSON sdist, wheel with metadata, yanked entries, and index parsing.
feat(pypi): support PEP 691 JSON Simple API responses
Some package indexes (e.g. JFrog Artifactory) return a JSON response for
Simple API pages even when
Accept: text/htmlis requested, ignoringcontent negotiation. Without this change, rules_python fails to parse
those responses.
Extend
parse_simpleapi_htmlto detect PEP 691 JSON responses bychecking if the content starts with
{, and delegate to a new_parse_simpleapi_jsonhelper. The helper handles package file lists,index pages, yanked entries (PEP 592), and
core-metadata/dist-info-metadatafields (PEP 714).Added unit tests for JSON sdist, wheel with metadata, yanked entries, and
index parsing.