Skip to content

Commit c67b49c

Browse files
committed
Replace hatch with build in the dev extra
The dev extra installed hatch only so contributors could run `hatch build`. hatch depends on virtualenv, which brings in filelock and python-discovery, so every filelock advisory landed on this lockfile even though the SDK never imports it. CI installs its own hatch through the setup-hatch action and does not use the extra. `python -m build` calls the same hatchling backend declared in build-system and isolates the build with the standard library venv module, so the dev extra no longer needs virtualenv. hatchling leaves the extra too, since build tools fetch it from build-system.requires.
1 parent 3cae5b6 commit c67b49c

4 files changed

Lines changed: 20 additions & 410 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66

77
- `socketdev` now requires Python 3.11 or newer. Python 3.10 reached end of
88
life in October 2026. Installs on Python 3.10 keep resolving to 3.6.x.
9-
- The development lockfile moves `filelock` to 4.3.3, which needs Python 3.11.
10-
`filelock` comes in only through the `dev` extra, so installs of `socketdev`
11-
are unaffected.
9+
10+
### Changed: `build` replaces `hatch` for local builds
11+
12+
- The `dev` extra replaces `hatch` and `hatchling` with `build`. Run
13+
`python -m build` to build the distributions; `hatchling` remains the build
14+
backend. This removes `virtualenv` and `filelock` from the development
15+
lockfile. Installs of `socketdev` are unaffected.
1216

1317
## 3.6.4
1418

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ complete local check is:
1616

1717
```bash
1818
python -m pytest
19-
hatch build
19+
python -m build
2020
python -m twine check dist/*
2121
```
2222

‎pyproject.toml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ core-metadata-version = "2.4"
4646
[project.optional-dependencies]
4747
dev = [
4848
"ruff>=0.3.0",
49-
"hatch>=1.18.1",
50-
"hatchling>=1.27.0",
49+
"build>=1.2.0",
5150
"twine>=4.0.0"
5251
]
5352
test = [

0 commit comments

Comments
 (0)