Repository navigation
Releases: pypa/hatch
Release list
Hatchling v1.32.4
Fixed:
- Revert the extra type parameter added to
BuildHookInterfacein 1.32.3, which broke plugins that subscripted the interface with a single argument (e.g.BuildHookInterface[MyConfig]) by raisingTypeErrorat import time.BuilderConfigis likewise no longer generic, restoring the pre-1.32.3 plugin interface. - Strip spaces around version metadata when using original input for CalVer to keep leading zeroes.
Hatchling v1.32.3
Fixed:
- Preserve the version string exactly as written in core metadata, so stylized versions such as CalVer
2026.08.10are no longer stripped of leading zeros. Distribution file names and.dist-infodirectories continue to use the PEP 440 normalized form.
Hatch v1.18.1
Added:
- Apply context formatting to the
lock-filenameenvironment option so fields such as{env_name}and{matrix:...}are resolved when computing the lock file path.
Fixed:
-
Consolidate extras and feature resolution into a single code path, fixing regressions where environment and project extras could be dropped or resolved inconsistently, and always validate undefined features.
-
Normalize hyphens in the plugin name when building environment option environment variable names in
get_env_var(), so options for hyphenated plugins resolve to the correct variable.
Hatchling v1.32.0
Changed:
-
Bump default core metadata version to 2.5
-
Add
tomlkitas a runtime dependency, which is required to rewritepyproject.tomlwhen setting a static version
Added:
- The
versioncommand can now set a version that is statically defined by theproject.versionfield, updatingpyproject.tomlin place. Pass--forceto allow an explicit downgrade
Fixed:
-
Allow the
; privateannotation onproject.import-namesandproject.import-namespacesentries rather than rejecting them as invalid import names. -
Reject
project.readmepaths that are absolute or resolve outside of the project directory.
Hatch v1.18.0
Changed:
- Upgrade default CPython distributions to 20260807
Added:
-
Add the
sourcesenvironment option, which redirects dependencies to a local path, Git repository, URL, alternate index, or workspace member at install time without altering published metadata. The top-level[tool.hatch.sources]table is an alias for thedefaultenvironment, environments inherit sources entry by entry, theHATCH_NO_SOURCESenvironment variable disables them, andhatch dep show sourcesreports what each source redirects -
Add the
--all/-aflag to thebuildcommand to build the workspace root and every workspace member defined by the selected environment, consolidating artifacts in the workspace root'sdistdirectory by default. A root that does not define aprojecttable is skipped so that a top-levelpyproject.tomlmay only contain workspace configuration -
Add the
tool.hatch.requires-hatchfield, a version specifier set that commands reading the project's metadata enforce against the running version of Hatch -
Add first-class support for free-threaded distribution names such as
3.13tand3.14tto thepythoncommands and environmentpythonoption, rather than requiring theHATCH_PYTHON_VARIANT_GILenvironment variable -
The
versioncommand can now bump versions that are statically defined by theproject.versionfield, updatingpyproject.tomlin place. Pass--forceto allow an explicit downgrade -
Support managing Python 3.15 distributions, currently 3.15.0rc1
Fixed:
-
Erase stale coverage data before running
hatch test --cover. -
Fix environment creation crashing when a metadata hook exists that doesn’t happen to be installed in the
hatchCLI’s environment. -
Fix commands run by
hatch runno longer being interruptible with Ctrl-C, which happened because the ignoredSIGINTof the parent process was inherited by the child process. -
Fix the generated Pyrefly config being invalid on Windows, since backslashes in the absolute paths were interpreted as TOML escape sequences.
-
Fix the hardcoded reliance on
pipwhen installing dependencies internally by usinguvinstead. -
Fix environment creation silently installing a GIL-enabled Python distribution when Hatch itself runs on a free-threaded build. The distribution matching the running interpreter, such as
3.14t, is now selected. -
Fix free-threaded selectors such as
3.14tbeing rejected by an environment'spythonoption, even thoughhatch python install 3.14talready accepted them. -
Never automatically select a prerelease Python distribution, such as 3.15.0rc1, when falling back to the latest compatible version. A prerelease is still installed when requested explicitly.
Hatchling v1.31.0
Fixed
- Only rewrite the shebang of a shared script when a Python shebang is present on the first line, preserving binary files and other content verbatim instead of dropping leading bytes.
Hatch v1.17.1
Fixed
- Use
TemporaryDirectoryand pylock*.toml for temporary lock files. - Skip injection of
ruffextend if a key already exists inruff.toml. - Pass
--no-headertouv pip compilein theuvlocker so that generated lockfiles are deterministic. - Fix env-dependency extras being dropped when a metadata hook is configured and resolve workspace-member extras from the member's own metadata.
Hatchling v1.30.1
Fixed
- Default core metadata version kept at 2.4 until more tools support 2.5
Hatch v1.17.0
Changed:
- The
hatch fmtcommand is now deprecated in favor of the newhatch checkcommand group - Migrate HTTP client from
httpxtohttpx2
Added:
- Add
hatch checkcommand group with subcommands forcheck code(linting),check fmt(formatting), andcheck types(type checking) - Add
hatch check typescommand for type checking using Pyrefly, with--summarizeand--coverflags - Add
hatch env lockcommand to generate PEP 751 compliant lockfiles (pylock.toml) for environments - Add
hatch dep lockandhatch lockcommands as shortcuts for locking the active environment - Add
hatch dep synccommand for syncing dependencies from a lockfile - Add pluggable dependency locker interface with built-in UV and pip implementations
- Add
--cover-xmland--cover-xml-outputflags to thehatch testcommand for generating XML coverage reports - Add linehaul telemetry data to User-Agent header for PyPI download statistics
- Auto-create environment when locking if it doesn't exist
Fixed:
- Fix help output formatting for the
runcommand
Hatch v1.16.5
Fixed:
- Handle a breaking change in
virtualenvby only supporting the latest version and addingpython-discoveryas a dependency.