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 inithatch 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.
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.
Prerelease distributions are no longer automatically selected when falling back to the latest compatible version, but remain installable when explicitly requested.
Hatch now supports only the latest version of virtualenv to handle a breaking change.
Keyring now expects a repository URL instead of a repository name.
Informational output is sent to stderr instead of stdout.
This environment type plugin method has been removed; environments are no longer expected to support a pseudo-build environment.
The minimum supported version of
packagingis now 24.2.Support for Python 3.9 has been dropped.
Hatch drops support for Python 3.8.
Deprecations 1
The command is deprecated in favor of the hatch check command group.
New APIs and options 21
Environment plugins should use this method to extend additional_dependencies so cached dependency views are invalidated.
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.
Reports what each source redirects.
Set this environment variable to disable sources.
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.
This version specifier set is enforced against the running Hatch version by commands that read project metadata.
Adds a pluggable dependency locker interface with built-in UV and pip implementations.
Adds a command group with subcommands for linting, formatting, and type checking.
Adds type checking using Pyrefly, with options to summarize results and measure coverage.
Adds a shortcut for locking the active environment.
Adds a command for syncing dependencies from a lockfile.
Adds a command to generate PEP 751 compliant lockfiles (pylock.toml) for environments.
Adds a flag for generating XML coverage reports.
An environment variable for keep-env can preserve the environment when an exception occurs during environment creation, enabling debugging.
Adds documented support for
sbom-filesas build data for thewheelbuild target.Build environments can now be configured; the default build environment is
hatch-build.Dependency group support has been added.
A new environment interface method or property was added to better support builds on remote machines.
Pass --force to allow an explicit version downgrade.
A new environment interface property was added to better support builds on remote machines.
Support for workspaces inspired by Cargo Workspaces has been added.
Performance 1
Multiple calls to install on sync_dependencies are now made as a single call.
Behavior and default changes 10
The version command can bump statically defined project.version values and update pyproject.toml in place.
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.
The top-level sources table acts as an alias for the default environment, and environments inherit sources entry by entry.
Locking automatically creates the environment if it does not exist.
Adds linehaul telemetry data to the header for PyPI download statistics.
All HTTP requests now set an identifiable
User-Agentheader.The command now supports projects that do not use Hatchling as the build backend.
Default CPython distributions are upgraded to the 20260807 release.
The default PyPy distributions are upgraded to 7.3.20.
Hatch v1 is identified as its first stable release.
Tooling 3
Internal dependency installation no longer relies on pip and uses uv instead.
Hatch supports managing Python 3.15 distributions, currently 3.15.0rc1.
Hatch adds support for Python 3.14.
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.
Syncing environment plugin requirements is fixed for standalone binaries built to forward to pip.
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.
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.
Consolidated resolution fixes regressions that could drop or inconsistently resolve environment and project extras, and ensures undefined features are always validated.
Hyphens in plugin names are normalized when building environment option variable names, so options for hyphenated plugins resolve to the correct variable.
Context formatting is applied to the lock-filename environment option, resolving fields such as {env_name} and {matrix:...} when computing the lock file path.
Environment creation no longer crashes when a metadata hook exists but is not installed in the hatch CLI environment.
Environment creation now selects the distribution matching Hatch's running interpreter, rather than silently installing a GIL-enabled distribution.
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.
Stale coverage data is erased before tests run with coverage.
The generated Pyrefly config is valid on Windows; backslashes in absolute paths are no longer interpreted as TOML escape sequences.
Environment dependency extras are no longer dropped when a metadata hook is configured.
Hatch no longer injects a Ruff extend key when ruff.toml already contains one.
The uv locker passes --no-header so generated lockfiles are deterministic.
Workspace-member extras are resolved from the member's own metadata.
Fixes help output formatting for the run command.
Fixes a type error for keep_env in hatch shell.
Workspace member detection now properly handles shared path prefixes.
Dependency groups now work when the environment is not marked as a builder.
An exception during environment creation no longer leaves an incomplete environment.
Self-referential dependencies are now recognized.
Fixes a regression that prevented environments from acknowledging the
project.optional-dependenciesfield.Environment overrides for dependency-groups now properly support matrix and conditional configurations.
Special characters in paths are now handled correctly for editable installs.
Context variables in project dependencies are formatted correctly, preventing crashes with variables such as
{root:parent:uri}.Fixed handling of the Click Sentinel value when using the command.
Fixed an issue where terminal output would be out of sync during build.
Fixes compatibility with cached default CPython distributions sourced from GitHub releases of the old owner.