Skip to content

Releases: pypa/hatch

Hatchling v1.32.4

Choose a tag to compare

@cjames23 cjames23 released this 20 Sep 22:49
Immutable release. Only release title and notes can be modified.
c4abc45

Fixed:

  • Revert the extra type parameter added to BuildHookInterface in 1.32.3, which broke plugins that subscripted the interface with a single argument (e.g. BuildHookInterface[MyConfig]) by raising TypeError at import time. BuilderConfig is 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

Choose a tag to compare

@cjames23 cjames23 released this 17 Sep 20:07
Immutable release. Only release title and notes can be modified.
0941887

Fixed:

  • Preserve the version string exactly as written in core metadata, so stylized versions such as CalVer 2026.08.10 are no longer stripped of leading zeros. Distribution file names and .dist-info directories continue to use the PEP 440 normalized form.

Hatch v1.18.1

Choose a tag to compare

@cjames23 cjames23 released this 16 Sep 18:34
Immutable release. Only release title and notes can be modified.
4b17561

Added:

  • Apply context formatting to the lock-filename environment 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

Choose a tag to compare

@cjames23 cjames23 released this 11 Aug 05:05
Immutable release. Only release title and notes can be modified.
558061c

Changed:

  • Bump default core metadata version to 2.5

  • Add tomlkit as a runtime dependency, which is required to rewrite pyproject.toml when setting a static version

Added:

  • The version command can now set a version that is statically defined by the project.version field, updating pyproject.toml in place. Pass --force to allow an explicit downgrade

Fixed:

  • Allow the ; private annotation on project.import-names and project.import-namespaces entries rather than rejecting them as invalid import names.

  • Reject project.readme paths that are absolute or resolve outside of the project directory.

Hatch v1.18.0

Choose a tag to compare

@cjames23 cjames23 released this 11 Aug 05:19
Immutable release. Only release title and notes can be modified.
558061c

Changed:

  • Upgrade default CPython distributions to 20260807

Added:

  • Add the sources environment 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 the default environment, environments inherit sources entry by entry, the HATCH_NO_SOURCES environment variable disables them, and hatch dep show sources reports what each source redirects

  • Add the --all/-a flag to the build command to build the workspace root and every workspace member defined by the selected environment, consolidating artifacts in the workspace root's dist directory by default. A root that does not define a project table is skipped so that a top-level pyproject.toml may only contain workspace configuration

  • Add the tool.hatch.requires-hatch field, 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.13t and 3.14t to the python commands and environment python option, rather than requiring the HATCH_PYTHON_VARIANT_GIL environment variable

  • The version command can now bump versions that are statically defined by the project.version field, updating pyproject.toml in place. Pass --force to 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 hatch CLI’s environment.

  • Fix commands run by hatch run no longer being interruptible with Ctrl-C, which happened because the ignored SIGINT of 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 pip when installing dependencies internally by using uv instead.

  • 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.14t being rejected by an environment's python option, even though hatch python install 3.14t already 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

Choose a tag to compare

@cjames23 cjames23 released this 08 Jul 01:53
Immutable release. Only release title and notes can be modified.
4b3fd7d

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

Choose a tag to compare

@cjames23 cjames23 released this 08 Jul 02:23
Immutable release. Only release title and notes can be modified.
5dae059

Fixed

  • Use TemporaryDirectory and pylock*.toml for temporary lock files.
  • Skip injection of ruff extend if a key already exists in ruff.toml.
  • Pass --no-header to uv pip compile in the uv locker 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

Choose a tag to compare

@cjames23 cjames23 released this 02 Jun 00:10
Immutable release. Only release title and notes can be modified.
37b00c3

Fixed

  • Default core metadata version kept at 2.4 until more tools support 2.5

Hatch v1.17.0

Choose a tag to compare

@cjames23 cjames23 released this 02 Jun 00:27
Immutable release. Only release title and notes can be modified.
37b00c3

Changed:

  • The hatch fmt command is now deprecated in favor of the new hatch check command group
  • Migrate HTTP client from httpx to httpx2

Added:

  • Add hatch check command group with subcommands for check code (linting), check fmt (formatting), and check types (type checking)
  • Add hatch check types command for type checking using Pyrefly, with --summarize and --cover flags
  • Add hatch env lock command to generate PEP 751 compliant lockfiles (pylock.toml) for environments
  • Add hatch dep lock and hatch lock commands as shortcuts for locking the active environment
  • Add hatch dep sync command for syncing dependencies from a lockfile
  • Add pluggable dependency locker interface with built-in UV and pip implementations
  • Add --cover-xml and --cover-xml-output flags to the hatch test command 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 run command

Hatch v1.16.5

Choose a tag to compare

@cjames23 cjames23 released this 27 Feb 18:49
Immutable release. Only release title and notes can be modified.
b998d2b

Fixed:

  • Handle a breaking change in virtualenv by only supporting the latest version and adding python-discovery as a dependency.