Skip unused release histories in PyPI and Pub package lookups - #88
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved blocking issues were identified.
Pull request overview
Optimizes PyPI and Pub metadata lookups by skipping unused release histories while preserving full version-listing behavior.
Changes:
- Adds minimal response types for metadata lookups.
- Adds decoding-error and allocation coverage.
- Retains full release-history decoding for version listings.
File summaries
| File | Description |
|---|---|
package_metadata_test.go |
Tests metadata decoding, error handling, and performance. |
internal/pypi/pypi.go |
Skips PyPI release-history decoding for metadata lookups. |
internal/pub/pub.go |
Skips Pub version-history decoding for metadata lookups. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Decode only package metadata for PyPI and Pub lookups, skipping unused release histories. For fixtures with 500 releases, this reduces allocated bytes by 64% for PyPI and 75% for Pub.
Package lookups now ignore invalid field types in unused release histories. Malformed JSON and invalid package metadata still fail, and full version listings retain their existing decoding behavior.