unstale

pypi / hatch

hatch

What changed in hatch 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

10 breaking1 deprecations21 new APIs and options1 performance10 behavior and defaults3 tooling29 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

hatch 175 changes

Breaking changes 10

  • When --include or --exclude matches no environments, the test command now aborts with a clear message instead of raising an IndexError with --cover or silently doing nothing.

    1.18.2release notes

  • When --include or --exclude matches no environments, the test command now aborts with a clear message instead of raising an IndexError with --cover or silently doing nothing.

    1.18.2release notes

  • Prerelease distributions are no longer automatically selected when falling back to the latest compatible version, but remain installable when explicitly requested.

    1.18.0release notes

  • Hatch now supports only the latest version of virtualenv to handle a breaking change.

    1.16.5release notes

  • Keyring now expects a repository URL instead of a repository name.

    1.16.3release notes

  • Informational output is sent to stderr instead of stdout.

    1.16.2release notes

  • This environment type plugin method has been removed; environments are no longer expected to support a pseudo-build environment.

    1.16.0release notes

  • The minimum supported version of packaging is now 24.2.

    1.16.0release notes

  • Support for Python 3.9 has been dropped.

    1.16.0release notes

  • Hatch drops support for Python 3.8.

    1.15.0release notes

Deprecations 1

  • The command is deprecated in favor of the hatch check command group.

    1.17.0release notes

New APIs and options 21

  • Environment plugins should use this method to extend additional_dependencies so cached dependency views are invalidated.

    1.18.2release notes

  • The --all/-a flag builds the workspace root and every member defined by the selected environment, consolidating artifacts in the root dist directory by default; a root without a project table is skipped.

    1.18.0release notes

  • Reports what each source redirects.

    1.18.0release notes

  • Set this environment variable to disable sources.

    1.18.0release notes

  • Add a sources environment option to redirect dependencies at install time without altering published metadata; sources can target local paths, Git repositories, URLs, alternate indexes, or workspace members.

    1.18.0release notes

  • This version specifier set is enforced against the running Hatch version by commands that read project metadata.

    1.18.0release notes

  • Adds a pluggable dependency locker interface with built-in UV and pip implementations.

    1.17.0release notes

  • Adds a command group with subcommands for linting, formatting, and type checking.

    1.17.0release notes

  • Adds type checking using Pyrefly, with options to summarize results and measure coverage.

    1.17.0release notes

  • Adds a shortcut for locking the active environment.

    1.17.0release notes

  • Adds a command for syncing dependencies from a lockfile.

    1.17.0release notes

  • Adds a command to generate PEP 751 compliant lockfiles (pylock.toml) for environments.

    1.17.0release notes

  • Adds a flag for generating XML coverage reports.

    1.17.0release notes

  • An environment variable for keep-env can preserve the environment when an exception occurs during environment creation, enabling debugging.

    1.16.3release notes

  • Adds documented support for sbom-files as build data for the wheel build target.

    1.16.2release notes

  • Build environments can now be configured; the default build environment is hatch-build.

    1.16.0release notes

  • Dependency group support has been added.

    1.16.0release notes

  • A new environment interface method or property was added to better support builds on remote machines.

    1.16.0release notes

  • Pass --force to allow an explicit version downgrade.

    1.16.0release notesrelease notes

  • A new environment interface property was added to better support builds on remote machines.

    1.16.0release notes

  • Support for workspaces inspired by Cargo Workspaces has been added.

    1.16.0release notes

Performance 1

  • Multiple calls to install on sync_dependencies are now made as a single call.

    1.16.1release notes

Behavior and default changes 10

  • The version command can bump statically defined project.version values and update pyproject.toml in place.

    1.18.0release notes

  • Python commands and the environment python option support free-threaded distribution names such as 3.13t and 3.14t without requiring HATCH_PYTHON_VARIANT_GIL.

    1.18.0release notes

  • The top-level sources table acts as an alias for the default environment, and environments inherit sources entry by entry.

    1.18.0release notes

  • Locking automatically creates the environment if it does not exist.

    1.17.0release notes

  • Adds linehaul telemetry data to the header for PyPI download statistics.

    1.17.0release notes

  • All HTTP requests now set an identifiable User-Agent header.

    1.16.0release notes

  • The command now supports projects that do not use Hatchling as the build backend.

    1.16.0release notes

  • Default CPython distributions are upgraded to the 20260807 release.

    1.15.0release notesrelease notesrelease notes

  • The default PyPy distributions are upgraded to 7.3.20.

    1.15.0release notes

  • Hatch v1 is identified as its first stable release.

    1.0.0release notes

Tooling 3

  • Internal dependency installation no longer relies on pip and uses uv instead.

    1.18.0release notes

  • Hatch supports managing Python 3.15 distributions, currently 3.15.0rc1.

    1.18.0release notes

  • Hatch adds support for Python 3.14.

    1.15.0release notes

Fixes and other changes 29

  • Build hooks that set require-runtime-dependencies or declare dynamic build dependencies no longer fail with ModuleNotFoundError because those dependencies were not installed into the build environment.

    1.18.2release notes

  • Syncing environment plugin requirements is fixed for standalone binaries built to forward to pip.

    1.18.2release notes

  • The fmt command no longer drops the default Ruff configuration when user configuration contains keys beginning with extend; only an exact extend key prevents injection.

    1.18.2release notes

  • Python 3.15 is officially supported; managed distributions use the final 3.15.0 release, and the default test matrix includes 3.15 and 3.15t.

    1.18.2release notes

  • Consolidated resolution fixes regressions that could drop or inconsistently resolve environment and project extras, and ensures undefined features are always validated.

    1.18.1release notes

  • Hyphens in plugin names are normalized when building environment option variable names, so options for hyphenated plugins resolve to the correct variable.

    1.18.1release notes

  • Context formatting is applied to the lock-filename environment option, resolving fields such as {env_name} and {matrix:...} when computing the lock file path.

    1.18.1release notes

  • Environment creation no longer crashes when a metadata hook exists but is not installed in the hatch CLI environment.

    1.18.0release notes

  • Environment creation now selects the distribution matching Hatch's running interpreter, rather than silently installing a GIL-enabled distribution.

    1.18.0release notes

  • Commands run through hatch run can again be interrupted with Ctrl-C because the parent process's ignored SIGINT is no longer inherited by the child.

    1.18.0release notes

  • Stale coverage data is erased before tests run with coverage.

    1.18.0release notes

  • The generated Pyrefly config is valid on Windows; backslashes in absolute paths are no longer interpreted as TOML escape sequences.

    1.18.0release notes

  • Environment dependency extras are no longer dropped when a metadata hook is configured.

    1.17.1release notes

  • Hatch no longer injects a Ruff extend key when ruff.toml already contains one.

    1.17.1release notes

  • The uv locker passes --no-header so generated lockfiles are deterministic.

    1.17.1release notes

  • Workspace-member extras are resolved from the member's own metadata.

    1.17.1release notes

  • Fixes help output formatting for the run command.

    1.17.0release notes

  • Fixes a type error for keep_env in hatch shell.

    1.16.4release notes

  • Workspace member detection now properly handles shared path prefixes.

    1.16.4release notes

  • Dependency groups now work when the environment is not marked as a builder.

    1.16.3release notes

  • An exception during environment creation no longer leaves an incomplete environment.

    1.16.3release notes

  • Self-referential dependencies are now recognized.

    1.16.3release notes

  • Fixes a regression that prevented environments from acknowledging the project.optional-dependencies field.

    1.16.2release notes

  • Environment overrides for dependency-groups now properly support matrix and conditional configurations.

    1.16.1release notes

  • Special characters in paths are now handled correctly for editable installs.

    1.16.1release notes

  • Context variables in project dependencies are formatted correctly, preventing crashes with variables such as {root:parent:uri}.

    1.16.1release notes

  • Fixed handling of the Click Sentinel value when using the command.

    1.16.0release notes

  • Fixed an issue where terminal output would be out of sync during build.

    1.16.0release notes

  • Fixes compatibility with cached default CPython distributions sourced from GitHub releases of the old owner.

    1.15.1release notes