Skip to content

Create the project .venv with the supported Python version #703

Backlog

Description

@Espoir-Loem

Problem

uv venv is called without a version, so a generated project can land on any interpreter uv finds. The project then claims >=3.12 but is not built with the version Nexy supports.

What we know

  • nexy/modules/cli/init/dependencies.py lines 138 to 145 creates the virtualenv with uv venv <path>.
  • The generated pyproject.toml files declare requires-python = ">=3.12".
  • New projects have no .python-version file.

Proposal

  • Pass the version from .python-version to uv venv as --python.
  • Write the same version into a .python-version file in the generated project.
  • Keep the offline path unchanged apart from the new version argument.

Acceptance

  • A test asserts the exact uv venv arguments.
  • A test asserts the content of the generated .python-version.
  • A test covers the offline path.
  • One assertion per test.

Activity

  1. added
    enhancement
    area:cli
    difficulty:intermediate
    python:uv
    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:intermediateenhancementpython:uv

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions