Conversation
Uses the official https://alpinelinux.org/releases.json JSON API, which provides complete historical data back to Alpine 2.1. Alpine does not publish pre-release/development dates, so begin_dev is always null and is_in_development_on() will raise NoDevelopmentInfoError for all Alpine entries. Closes #41 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| ErrorProne | 1 high |
| Security | 1 medium 11 high |
🟢 Metrics 13 complexity · 0 duplication
Metric Results Complexity 13 Duplication 0
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes. Give us feedback
There was a problem hiding this comment.
Code Review
This pull request adds support for Alpine Linux by introducing a new data file, a downloader module, and corresponding tests. The review feedback suggests adding a timeout to the network request to prevent potential hangs and utilizing json.load(response) for more efficient stream-based JSON parsing.
- Add timeout=10 to urlopen to prevent indefinite hangs - Use json.load(response) instead of read().decode() for more efficient stream-based JSON parsing Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
B101 (assert_used) is a false positive for pytest test code. Exclude the tests/ directory from Bandit scanning so assert statements in tests don't generate noise. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Adds support for Alpine Linux using the official
https://alpinelinux.org/releases.jsonJSON API.Changes
src/distro_support/alpine.py: downloader using the JSON API (with 10s timeout, stream-based JSON parsing)src/distro_support/alpine.json: bundled offline data (v2.1–v3.23, 31 versions)tests/test_alpine_downloader.py: 6 unit tests with mocked JSON responsestests/test_get_support_range.py: Alpine integration test casestools/update.py: registers Alpine in the update looppyproject.toml: configure Bandit to exclude thetests/directory (B101 assert_used is a false positive for pytest code)Notes
begin_devis alwaysnull— Alpine does not publish pre-release dates, sois_in_development_on()raisesNoDevelopmentInfoErrorfor all Alpine entriesend_extended_supportis alwaysnullCloses #41