Skip to content

Possible regression in 1.16.3: hatch shell fails with TypeError: Project.prepare_environment() missing 1 required keyword-only argument: 'keep_env' #2169

@ltdroy

Description

@ltdroy

After installing Hatch 1.16.3, the hatch shell command fails with a TypeError. This appears to be a regression as it works correctly in 1.16.2.

Environment:

Hatch Version: 1.16.3
OS: macOS (Apple Silicon)
Python Version: 3.13 (and also reproducible on 3.14)

Minimal Reproducible Example:

pipx install hatch==1.16.3 --force
mkdir hatch-bug-repro
cd hatch-bug-repro
touch pyproject.toml
code pyproject.toml

pyproject.toml added:

[project]
name = "repro"
version = "0.1.0"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
hatch shell

Workaround

pipx install hatch==1.16.2 --force
hatch shell

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions