Skip to content

fix: preserve nonzero Debian version epochs - #228

Open
codewithfourtix wants to merge 1 commit into
aboutcode-org:masterfrom
codewithfourtix:fix/debian-default-epoch
Open

codewithfourtix wants to merge 1 commit into
aboutcode-org:masterfrom
codewithfourtix:fix/debian-default-epoch

Conversation

@codewithfourtix

Copy link
Copy Markdown

Fixes #227.

Remove only a leading 0: default epoch when normalizing Debian and Ubuntu versions. Replacing every 0: substring corrupts nonzero epochs such as 30:0.30-6 into 30.30-6.

Add offline regression tests through versions() for both registries. They cover epochs 30, 10, and 1, removal of the default epoch, and versions without an epoch.

Validation:

  • Both new regression cases fail before the fix and pass afterward.
  • Full test suite on Python 3.12: 158 passed.
  • Repository pycodestyle, isort, and Black checks passed; git diff --check passed.

Signed-off-by: Ali Zulfiqar <codewithfourtix@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 26, 2026 09:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
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.

package_versions.versions() corrupts Debian/Ubuntu epochs ending in 0 (e.g. 30:0.30-6 -> 30.30-6)

2 participants