Skip to content

fix(cli): smpy new warns when a newer simple_module_cli is on PyPI (#899) - #907

Merged
antosubash merged 4 commits into
mainfrom
fix/issue-899-stale-smpy
Nov 11, 2026
Merged

antosubash merged 4 commits into
mainfrom
fix/issue-899-stale-smpy

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

  • smpy new now checks PyPI for the latest simple_module_cli before it scaffolds, using a best-effort 3 s lookup. If the running CLI is older, it prints a warning to stderr that names uv tool upgrade simple_module_cli (or pipx upgrade) and uvx --from simple_module_cli@latest.
    • The warning matters because a new app pins the framework to the CLI's own version, so an old tool silently scaffolds an old app.
    • The check never blocks the scaffold. It is skipped for the placeholder, pre-release, dev and local versions, and on any lookup error.
  • New simple_module_cli/_version_check.py. It reuses pypi.fetch_latest and pypi.default_fetcher, which now takes a timeout.
  • An autouse fixture keeps every CLI test off the network.
  • Install instructions:
    • the root, CLI and hosting READMEs, and the host landing page's copy command, use uvx --from simple_module_cli@latest;
    • the installation, quickstart, index and make-commands docs say how to upgrade an installed CLI.

Closes #899

Verification

  • Against live PyPI: a running 0.0.36 reports 0.0.44, and 0.0.44 reports nothing. The lookup took 0.16 s.
  • Local CI: make lint ✓, make ci-docs-build ✓, make test-py ✓ (8309), make test-js ✓ (906).
  • Reviewed in 3 passes of correctness and maintainability reviewers, plus Codex, which found nothing.
  • Verification report: https://claude.ai/artifact/MjbprMRWwGGVDECauieoCf

Report links are Claude Artifacts and start private — the author can share them
from claude.ai/code/artifacts if reviewers need access.

Test plan

  • With an older smpy installed as a uv tool, smpy new demo -y prints the upgrade warning and still scaffolds
  • CI is green

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying simple-module-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8bcf6e6
Status: ✅  Deploy successful!
Preview URL: https://743cb494.simple-module-python.pages.dev
Branch Preview URL: https://fix-issue-899-stale-smpy.simple-module-python.pages.dev

View logs

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-11T00:11:03.935271Z 8bcf6e6 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 e39b9f9 into main Nov 11, 2026
16 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.

cli: uvx smpy new silently uses an older installed smpy tool and scaffolds an outdated app

1 participant