Hatchling 历史记录¶
本文档记录了 Hatchling 项目的所有重要变更。
未发布(Unreleased)¶
1.27.0 - 2024-11-26¶
新增:
- 将核心元数据的默认版本更新为 2.4
1.26.3 - 2024-11-12¶
修复:
- 支持仍被一些用户(如 Hatch)使用的旧导入路径
1.26.2 - 2024-11-12¶
修复:
- 为核心元数据版本低于 2.4 的情况填充字符串
license字段(License-Expression) - 移除在上一个小版本中遗漏的版本 2.2 的
License-Expression和License-Files核心元数据字段
1.26.1 - 2024-11-10¶
修复:
- 为旧版
license-files元数据字段添加向后兼容性 - 支持仍被一些用户(如 Hatch)使用的旧导入路径
1.26.0 - 2024-11-10¶
变更:
license-files元数据字段已更新为最新规格,现在仅为 glob 模式数组
新增:
- 支持
wheel和sdist目标的核心元数据 2.4 版本 - 新增
HATCH_METADATA_CLASSIFIERS_NO_VERIFY环境变量,用于禁用 Trove 分类器验证 - 将
.pixi添加到无法遍历的目录列表中 - 将
packaging的最低支持版本提升至 24.2
修复:
- 对于核心元数据版本低于 2.4 的情况,不再写入许可证表达式和文件的包元数据
- 正确启用
wheel目标的 Zip64 支持 - 正确忽略当项目根目录匹配某个模式时的父级
.gitignore文件
1.25.0 - 2024-06-22¶
变更:
wheel目标的macos-max-compat选项默认已禁用,并将在未来版本中移除
新增:
wheel和sdist目标的工件现在已经标准化其权限位
修复:
- 在启用
infer_tag构建数据时,忽略manylinux/musllinux标签在wheel目标工件名称中的影响 - 启用
infer_tag时,wheel目标构建数据现在会尊重MACOSX_DEPLOYMENT_TARGET环境变量
1.24.2 - 2024-04-22¶
修复:
- 将
.venv添加到无法遍历的目录列表中 - 核心应用程序实用工具的输出现在写入
stderr
1.24.1 - 2024-04-18¶
Fixed:
- Maintain file permissions for
shared-scriptsoption/shared_scriptsbuild data of thewheeltarget
1.24.0 - 2024-04-16¶
Added:
- Add
shared_dataandshared_scriptsbuild data for thewheeltarget
1.23.0 - 2024-04-14¶
Added:
- Add
shared-scriptsoption for thewheeltarget
Fixed:
- Support recursive optional dependencies
- Set the
packagingdependency version as>=23.2to avoid its URL validation which can conflict with context formatting
1.22.5 - 2024-04-04¶
Fixed:
- Fix reading metadata from source distributions when fields are dynamic but not part of core metadata like entry points
1.22.4 - 2024-03-23¶
Fixed:
- Only read source distribution metadata for fields that are explicitly defined as dynamic
1.22.3 - 2024-03-19¶
Fixed:
- Fix the
custombuild hook when using dynamic dependencies
1.22.2 - 2024-03-16¶
Fixed:
- Fix regression when loading metadata from source distributions
- Fix metadata hooks when building wheels from source distributions
1.22.1 - 2024-03-16¶
Fixed:
- Update the default version of core metadata to 2.3
1.22.0 - 2024-03-16¶
Deprecated:
- The
appbuild target has been renamed tobinaryto reduce ambiguity with the name of an upcoming feature. The former name will still be usable for several minor releases.
Added:
- Metadata for the
wheeltarget now defaults to thePKG-INFOmetadata within source distributions - Add
dependenciesmethod to the build hook interface so that hooks can themselves dynamically define dependencies - Update the default version of core metadata to 2.2
- Update SPDX license information to version 3.23
- Improve error message for when the default heuristics for wheel file inclusion fail
Fixed:
- Properly support core metadata version 2.2
- Remove
editablesas a direct dependency - Fix default wheel tag when the supported Python version declaration is strict
- Load VCS ignore patterns first so that whitelisted patterns can be excluded by project configuration
- Don't consider VCS ignore files that are outside of the VCS boundary
- The
sdistbuild target now gracefully ignores UNIX socket files - Begin ignoring certain files ubiquitously, like
.DS_Storeon macOS
1.21.1 - 2024-01-25¶
Fixed:
- Fix loading of local plugins to account for newly released versions of a dependency
1.21.0 - 2023-12-18¶
Added:
- Add
parentcontext modifier for path fields
1.20.0 - 2023-12-13¶
Added:
- Add
bypass-selectionoption to thewheelbuild target to allow for empty (metadata-only) wheels
Fixed:
- Fix regression in 1.19.1 that allowed
excludeto count toward inclusion selection, thus bypassing the default inclusion selection heuristics - Fix writing optional dependency core metadata in situations where there are multiple environment markers
1.19.1 - 2023-12-12¶
Fixed:
- Add better error message when the
wheelbuild target cannot determine what to ship - Consider forced inclusion patterns and build-time artifacts as file selection since some build hooks generate the entire wheel contents without user configuration
1.19.0 - 2023-12-11¶
Changed:
- An error will now be raised if a force-included path does not exist
- An error will now be raised for the
wheelbuild target if no file selection options are defined
Added:
- Officially support Python 3.12
- Allow using an empty string for the
sourcesoption to add a prefix to distribution paths
Fixed:
- Properly handle non-zero version epoch for the
standardversion scheme - Fix the
wheelbuild target for case insensitive file systems when the project metadata name does not match the directory name on disk - The
appbuild target no longer has suppressed output - Prevent duplicate paths when projects require the
sourcesoption while build hooks overwrite included paths - Properly escape spaces for URI context formatting
1.18.0 - 2023-06-12¶
Changed:
- Drop support for Python 3.7
Added:
- Update the list of directories that are always excluded for builds
1.17.1 - 2023-06-03¶
Fixed:
- Fix dev mode when the project has symlinks and file inclusion is defined with the
packagesoronly-includeoptions - Change the name of generated PTH files for dev mode so they come first lexicographically and therefore load first
1.17.0 - 2023-05-12¶
Added:
- The
appbuild target now embeds the project version in the name of binaries
1.16.1 - 2023-05-11¶
Fixed:
- Fix determining the built executable path for the
appbuild target option when using a local copy of PyApp when there is an explicit target triple set
1.16.0 - 2023-05-11¶
Added:
- Add
appbuild target option to build using a local copy of the PyApp repository
1.15.0 - 2023-05-09¶
Added:
- Add
appbuild target
1.14.1 - 2023-04-23¶
Fixed:
- Fix internal archive root naming for the
sdisttarget whenstrict-namingis disabled to match the file name in order to support the expectation of some frontends
1.14.0 - 2023-04-02¶
Added:
- Add
trove-classifiersas a dependency
Fixed:
- Properly normalize metadata descriptions that contain line breaks
1.13.0 - 2023-02-09¶
Added:
- Update the set of known trove classifiers to version 2023.2.8
1.12.2 - 2023-01-05¶
Fixed:
- Add
macos-max-compatoption to thewheeltarget that is enabled by default to support the latest version 22.0 of thepackaginglibrary
1.12.1 - 2022-12-31¶
Fixed:
- Fix minor regression in the PEP 517/660 function signatures that was discovered by Fedora
1.12.0 - 2022-12-30¶
Added:
- Improve readability of exceptions
- Add
extra_metadatabuild data to thewheeltarget - Retroactively support
License-Expressioncore metadata starting at version 2.1 - Add more type hints
- Update the set of known trove classifiers to version 2022.12.22
- Update SPDX license information to version 3.19
- Store Hatchling's metadata in
pyproject.toml
Fixed:
- Acknowledge the
ARCHFLAGSenvironment variable on macOS for thewheeltarget when build hooks set theinfer_tagbuild data totrue - Fix dependency checking when encountering broken distributions
- Fix the
support-legacyoption for thesdisttarget when using a src-layout project structure - Remove unnecessary encoding declaration in the default template for the
versionbuild hook
1.11.1 - 2022-10-19¶
Fixed:
- Fix default file selection behavior of the
wheeltarget when there is a single top-level module
1.11.0 - 2022-10-08¶
Added:
- Add
envversion source to retrieve the version from an environment variable - Add
validate-bumpoption to thestandardversion scheme
Fixed:
- Use proper CSV formatting for the
RECORDmetadata file of thewheeltarget to avoid warnings during installation bypipif, for example, file names contain commas - Fix installations with pip for build hooks that modify runtime dependencies
- Decreasing verbosity now has no affect on output that should always be displayed
1.10.0 - 2022-09-18¶
Added:
- Add the following to the list of directories that cannot be traversed:
__pypackages__,.hg,.hatch,.tox,.nox - Add deprecated option to allow ambiguous features
Fixed:
- Improve tracking of dynamic metadata
- Fix core metadata for entries in
project.optional-dependenciesthat use direct references
1.9.0 - 2022-09-09¶
Changed:
- File pattern matching now more closely resembles Git's behavior
Added:
- Implement a minimal version of
prepare_metadata_for_build_wheelandprepare_metadata_for_build_editablefor non-frontend tools that only need to inspect a project's metadata - Add
metadatacommand to view PEP 621 project metadata - Improve error messages for SPDX license errors
- Retroactively support
License-Filefor core metadata starting at version 2.1 - Bump the minimum supported version of
pathspecto 0.10.1
Fixed:
- Allow the valid non-SPDX
licensevaluesLicenseRef-Public-DomainandLicenseRef-Proprietary - Show the help text of the CLI when no subcommand is selected
1.8.1 - 2022-08-25¶
Fixed:
- Fix default file inclusion for
wheelbuild targets when both the project name and package directory name are not normalized
1.8.0 - 2022-08-16¶
Added:
- Add
get_known_classifiersmethod to metadata hooks
Fixed:
- Fix check for updating static versions with the
versioncommand when metadata hooks are in use
1.7.1 - 2022-08-13¶
Fixed:
- Fix the value of the
relative_pathattribute of included files, that some build plugins may use, when selecting explicit paths
1.7.0 - 2022-08-12¶
Added:
- Add
require-runtime-featuresoption for builders and build hooks - Check for unknown trove classifiers
- Update SPDX license information to version 3.18
Fixed:
- Add better error message for
wheeltarget dev mode installations that define path rewrites with thesourcesoption - Note the
allow-direct-referencesoption in the relevant error messages
1.6.0 - 2022-07-23¶
Changed:
- When no build targets are specified on the command line, now default to
sdistandwheeltargets rather than what happens to be defined in config - The
codeversion source now only supports files with known extensions - Global build hooks now run before target-specific build hooks to better match expected behavior
Added:
- The
codeversion source now supports loading extension modules - Add
search-pathsoption for thecodeversion source
Fixed:
- Fix removing
sourcesusing an empty string value in the mapping - The
strict-namingoption now also applies to the metadata directory ofwheeltargets
1.5.0 - 2022-07-11¶
Added:
- Support the final draft of PEP 639
- Add
strict-namingoption forsdistandwheeltargets
Fixed:
- Project names are now stored in
sdistandwheeltarget core metadata exactly as defined inpyproject.tomlwithout normalization to allow control of how PyPI displays them
1.4.1 - 2022-07-04¶
Fixed:
- Fix forced inclusion of important files like licenses for
sdisttargets when using the explicit selection options - Don't sort project URL metadata so that the rendered order on PyPI can be controlled
1.4.0 - 2022-07-03¶
Changed:
- The
packagesoption uses the newonly-includeoption to provide targeted inclusion, since that is desired most of the time. You can retain the old behavior by using theincludeandsourcesoptions together.
Added:
- Support PEP 561 type hinting
- Add
versionbuild hook - Add
only-includeoption - The
editableversion ofwheeltargets now respects theforce-includeoption by default - The
force-includeoption now supports path rewriting with thesourcesoption - The
wheeltargetshared-dataandextra-metadataoptions now respect file selection options - The
wheeltarget now auto-detects single module layouts - Improve performance by never entering directories that are guaranteed to be undesirable like
__pycache__rather than excluding individual files within - Update SPDX license information to version 3.17
Fixed:
- Don't write empty entry points file for
wheeltargets if there are no entry points defined - Allow metadata hooks to set the
versionin all cases - Prevent duplicate file entries from inclusion when using the
force-includeoption
1.3.1 - 2022-05-30¶
Fixed:
- Better populate global variables for the
codeversion source
1.3.0 - 2022-05-22¶
Removed:
- Remove unused global
argscontext string formatting field
Added:
- Improve error messages for the
envcontext string formatting field
Fixed:
- Fix
uricontext string formatting modifier on Windows
1.2.0 - 2022-05-20¶
Added:
- Allow context formatting for
project.dependenciesandproject.optional-dependencies
1.1.0 - 2022-05-19¶
Added:
- Add
uriandrealcontext string formatting modifiers for file system paths
1.0.0 - 2022-05-17¶
Changed:
- Drop support for Python 2
Added:
- Improve error messaging for invalid versions
- Update project metadata to reflect support for Python 3.11
0.25.1 - 2022-06-14¶
Fixed:
- Fix support for Windows on Python 2 by removing its support for symlinks
0.25.0 - 2022-05-15¶
Added:
- Add
skip-excluded-dirsbuild option - Allow build data to add additional project dependencies for
wheelandsdistbuild targets - Add
force_include_editablebuild data for thewheelbuild target - Add
build_hooksbuild data - Add support for Mercurial's
.hgignorefiles when using glob syntax - Update project metadata to reflect the adoption by PyPA
Fixed:
- Properly use underscores for the name of
force_includebuild data - No longer greedily skip excluded directories by default
0.24.0 - 2022-04-28¶
This is the initial public release of the Hatchling build system. Support for Python 2 will be dropped in version 1.