Skip to content

Commit 8e1a709

Browse files
cjames23ofek
andauthored
hatch-v1.16.x (#2106)
* Change user-agent to use sys module, prepare docs for release * release Hatchling v1.28.0 * release Hatch v1.16.0 * Remove unused import * Fix formatting * Fix additional formatting * Fix User Agent Header test and version format * Fix test format * Release 1.16.0 - Fix missing changelog entries * Address review changes * Update src/hatch/index/core.py Co-authored-by: Ofek Lev <ofekmeister@gmail.com> --------- Co-authored-by: Ofek Lev <ofekmeister@gmail.com>
1 parent 9d25ed0 commit 8e1a709

File tree

5 files changed

+55
-12
lines changed

5 files changed

+55
-12
lines changed

backend/src/hatchling/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.27.0"
1+
__version__ = "1.28.0"

docs/history/hatch.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,68 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88

99
## Unreleased
1010

11+
## [1.16.0](https://github.com/pypa/hatch/releases/tag/hatch-v1.16.0) - 2025-11-26 ## {: #hatch-v1.16.0 }
12+
1113
***Changed:***
1214

13-
- Drop support for Python 3.8
15+
- Drop support for 3.9
1416
- Environment type plugins are now no longer expected to support a pseudo-build environment as any environment now may be used for building. The following methods have been removed: `build_environment`, `build_environment_exists`, `run_builder`, `construct_build_command`
1517

1618
***Added:***
1719

18-
- Upgrade Ruff to 0.13.2
20+
- Support for workspaces inspired by Cargo Workspaces
21+
- Dependency group support.
1922
- The `version` and `project metadata` commands now support projects that do not use Hatchling as the build backend
2023
- The `version` command accepts a `--force` option, allowing for downgrades when an explicit version number is given.
2124
- Build environments can now be configured, the default build environment is `hatch-build`
2225
- The environment interface now has the following methods and properties in order to better support builds on remote machines: `project_root`, `sep`, `pathsep`, `fs_context`
2326
- Bump the minimum supported version of `packaging` to 24.2
27+
- Upgrade Ruff to 0.13.2
2428

2529
***Fixed:***
2630

31+
- All HTTP requests now set an identifiable `User-Agent` header.
2732
- Fix issue where terminal output would be out of sync during build.
2833
- Fix for Click Sentinel value when using `run` command
2934

35+
## [1.15.1](https://github.com/pypa/hatch/releases/tag/hatch-v1.15.1) - 2025-10-16 ## {: #hatch-v1.15.1 }
36+
37+
***Fixed:***
38+
39+
- Fix compatibility with cached default CPython distributions that were sourced from GitHub releases of the old owner
40+
41+
## [1.15.0](https://github.com/pypa/hatch/releases/tag/hatch-v1.15.0) - 2025-10-15 ## {: #hatch-v1.15.0 }
42+
43+
***Changed:***
44+
45+
- Drop support for Python 3.8
46+
47+
***Added:***
48+
49+
- Support Python 3.14
50+
- Upgrade default CPython distributions to 20251014
51+
- Upgrade default PyPy distributions to 7.3.20
52+
53+
## [1.14.2](https://github.com/pypa/hatch/releases/tag/hatch-v1.14.2) - 2025-09-24 ## {: #hatch-v1.14.2 }
54+
55+
***Fixed:***
56+
57+
- Fix compatibility with recent versions of Click
58+
59+
## [1.14.1](https://github.com/pypa/hatch/releases/tag/hatch-v1.14.1) - 2025-04-07 ## {: #hatch-v1.14.1 }
60+
61+
***Fixed:***
62+
63+
- Remove uses of the deprecated `--no-python-version-warning` flag when using pip
64+
65+
## [1.14.0](https://github.com/pypa/hatch/releases/tag/hatch-v1.14.0) - 2024-12-16 ## {: #hatch-v1.14.0 }
66+
67+
***Added:***
68+
69+
- Upgrade default CPython distributions to 20241206
70+
- Bump the minimum supported version of Hatchling to 1.26.3
71+
- Update `virtualenv` dependency
72+
3073
## [1.13.0](https://github.com/pypa/hatch/releases/tag/hatch-v1.13.0) - 2024-10-13 ## {: #hatch-v1.13.0 }
3174

3275
***Added:***

docs/history/hatchling.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88

99
## Unreleased
1010

11+
## [1.28.0](https://github.com/pypa/hatch/releases/tag/hatchling-v1.28.0) - 2025-11-26 ## {: #hatchling-v1.28.0 }
12+
1113
***Changed:***
1214

13-
- Drop support for Python 3.8
15+
- Drop support for Python 3.9
1416

15-
***Changed:***
17+
***Added:***
1618

17-
- Drop support for Python 3.8
19+
- Add `sbom-files` option and `sbom_files` build data to the `wheel` build target for including Software Bill of Materials files.
1820

1921
## [1.27.0](https://github.com/pypa/hatch/releases/tag/hatchling-v1.27.0) - 2024-11-26 ## {: #hatchling-v1.27.0 }
2022

src/hatch/index/core.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import sys
34
from functools import cached_property
45
from typing import TYPE_CHECKING
56

@@ -49,15 +50,13 @@ def __init__(self, repo: str, *, user="", auth="", ca_cert=None, client_cert=Non
4950

5051
@cached_property
5152
def client(self) -> httpx.Client:
52-
import platform
53-
5453
import httpx
5554

5655
from hatch.utils.network import DEFAULT_TIMEOUT
5756

5857
user_agent = (
5958
f"Hatch/{__version__} "
60-
f"{platform.python_implementation()}/{platform.python_version()} "
59+
f"{sys.implementation.name}/{'.'.join(map(str, sys.version_info[:3]))} "
6160
f"HTTPX/{httpx.__version__}"
6261
)
6362
return httpx.Client(

tests/index/test_core.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import platform
2+
import sys
23

34
import httpx
45
import pytest
@@ -80,8 +81,6 @@ def test_user_agent_header_format(self):
8081
user_agent = client.headers["User-Agent"]
8182

8283
expected = (
83-
f"Hatch/{__version__} "
84-
f"{platform.python_implementation()}/{platform.python_version()} "
85-
f"HTTPX/{httpx.__version__}"
84+
f"Hatch/{__version__} {sys.implementation.name}/{platform.python_version()} HTTPX/{httpx.__version__}"
8685
)
8786
assert user_agent == expected

0 commit comments

Comments
 (0)