Skip to content

fix(cli): PEP 440 release ordering for package-update; honour uv workspace excludes (#766, #767) - #794

Merged
antosubash merged 7 commits into
mainfrom
feat/b46-cli-version-order
Nov 3, 2026
Merged

antosubash merged 7 commits into
mainfrom
feat/b46-cli-version-order

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

  • [P2] cli: package-update misorders prereleases and cannot promote an RC pin to final #766 smpy package-update now orders releases by PEP 440 (packaging.version.Version) instead of a numeric-only key:
    • with --include-pre, rc2 beats rc1 and a final release beats its RCs;
    • in stable-only mode, an ==X rcN pin moves to the final X;
    • pins still never move backwards.
  • packaging is now a CLI runtime dependency, so the hand-written comparators now delegate to it (_compare, wildcard matching, </<=/!= checks).
  • Version spellings that are not valid PEP 440, in a pin or a release, are reported as skips instead of aborting the run.
  • [P2] cli: package-update edits projects excluded from the uv workspace #767 workspace_member_dirs applies [tool.uv.workspace].exclude, reusing uv_workspace.is_workspace_member. An excluded project is left byte-for-byte unchanged; covered for an exact path and a glob.
  • Docs (installation guide, CLI README) and the CHANGELOG are updated.

Closes #766
Closes #767

Review

/ship pipeline: optimize (nothing safe to remove), then three correctness passes plus a maintainability pass (Sonnet). Fixed along the way:

  • invalid version or specifier bounds crashing the run;
  • a ~= floor bumped past a pre-release;
  • wildcard matching ignoring epochs and dev/post releases;
  • duplicated validity checks merged into one is_valid_version;
  • stale README and docstrings.

Deferred: replacing the remaining hand-written helpers in git_versions.py with SpecifierSet. It changes behaviour, and version_tuple is public.

Verification

  • make lint: passes.
  • make test-py: 7250 passed. The one local failure is the known /tmp/.git sandbox placeholder (test_clean_target_is_not_in_repo); it passes once the placeholder is removed.
  • No JS changes.

https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Deploying simple-module-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6d6ca15
Status: ✅  Deploy successful!
Preview URL: https://e372fc90.simple-module-python.pages.dev
Branch Preview URL: https://feat-b46-cli-version-order.simple-module-python.pages.dev

View logs

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-03T17:33:43.624451Z 3a7c624 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@antosubash
antosubash merged commit 94bcb44 into main Nov 3, 2026
16 checks passed
@antosubash
antosubash deleted the feat/b46-cli-version-order branch November 3, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant