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.