Skip to content

feat: add Alpine Linux support#46

Merged
lengau merged 3 commits intomainfrom
work/add-alpine
Apr 22, 2026
Merged

feat: add Alpine Linux support#46
lengau merged 3 commits intomainfrom
work/add-alpine

Conversation

@lengau
Copy link
Copy Markdown
Owner

@lengau lengau commented Apr 22, 2026

Adds support for Alpine Linux using the official https://alpinelinux.org/releases.json JSON 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 responses
  • tests/test_get_support_range.py: Alpine integration test cases
  • tools/update.py: registers Alpine in the update loop
  • pyproject.toml: configure Bandit to exclude the tests/ directory (B101 assert_used is a false positive for pytest code)

Notes

  • begin_dev is always null — Alpine does not publish pre-release dates, so is_in_development_on() raises NoDevelopmentInfoError for all Alpine entries
  • No extended support (LTS) — end_extended_support is always null
  • Full historical data back to Alpine 2.1 (2010)

Closes #41

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>
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 22, 2026

Not up to standards ⛔

🔴 Issues 12 high · 1 medium

Alerts:
⚠ 13 issues (≤ 0 issues of at least minor severity)

Results:
13 new issues

Category Results
ErrorProne 1 high
Security 1 medium
11 high

View in Codacy

🟢 Metrics 13 complexity · 0 duplication

Metric Results
Complexity 13
Duplication 0

View in Codacy

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

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/distro_support/alpine.py Outdated
Comment thread src/distro_support/alpine.py Outdated
lengau and others added 2 commits April 22, 2026 00:40
- 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>
@lengau lengau merged commit 0852cd4 into main Apr 22, 2026
21 of 22 checks passed
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.

feat: add Alpine Linux support

1 participant