Skip to content

Refuse an unsupported Python version before scaffolding #704

Backlog

Description

@Espoir-Loem

Problem

No Python version guard exists in new or init. A user on an older interpreter reaches the scaffolder and fails later with a message that points nowhere near the cause.

What we know

  • nexy/modules/cli/commands/new.py lines 37 to 45 calls InitProject().run(...).
  • nexy/modules/cli/commands/init.py lines 11 to 13 calls the same orchestrator.
  • nexy/modules/cli/init/project.py lines 26 to 45 resolves the destination before any dependency work.
  • No sys.version_info check exists in nexy/.

Proposal

Check the interpreter before any file is written. On an unsupported version, print the current version, the supported version from .python-version, and the exact uv python install command that fixes it. Apply the check to both new and init. Do not start the installer from inside the guard: the user decides whether to install.

Acceptance

  • A test covers a supported version.
  • A test covers an older version and asserts the message names both versions and the fix command.
  • No directory is created when the check fails.
  • One assertion per test.

Activity

  1. added
    enhancement
    area:cli
    difficulty:intermediate
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clidifficulty:intermediateenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions