pypa / hatch

Modern, extensible Python project management
https://hatch.pypa.io/latest/
MIT License
6.1k stars 309 forks source link

How does hatchling versioning work? #1750

Closed konstin closed 1 month ago

konstin commented 1 month ago

In the docs (https://hatch.pypa.io/latest/config/build/#build-system) it recommends using the following, i.e. just a plain hatchling requirement without any version constraints:

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

I'm wondering how hatchling versioning works here: If I publish my package now, the build frontend will pick the latest version of hatchling in the future, but the my package will keeping using e.g. the [tool.hatch.build.targets.sdist] include and exclude include options as published. Does this mean these options will be supported in hatchling the same forever, or is there a plan for making breaking changes, such as doing breaking changes in a differently named hatchling2 package?

ofek commented 1 month ago

No breaking changes are planned except for a gradual deprecation to the current plugin discovery implementation that will be replaced by something easier for the user.

konstin commented 1 month ago

Thanks

ofek commented 1 month ago

Anytime! Is there something specific I could help with?

konstin commented 1 month ago

This came up during reviewing https://github.com/astral-sh/uv/pull/7857: Most build backends seem to recommend using their packages without any bounds, and i wanted to avoid having templates for packages that break when the build backend changes, so I've started inquiring about the change policies policies of build backends.

ofek commented 1 month ago

Thanks for the context 🙂