Bound runtime dependency ranges and pin build backend - #103
Conversation
Add version bounds to the runtime dependencies: requests was fully unbounded and typing-extensions had no upper bound, so a fresh install could resolve either to any just-published release. As a library, socketdev declares bounded ranges rather than exact pins - exact pins in package metadata would conflict with consumers that pin their own dependencies, including socket-python-cli, which pins its entire runtime closure (socketsecurity 2.5.10+) and relies on this package's ranges staying compatible. Floors match the versions already resolved and tested in uv.lock; ceilings exclude the next major. Also pins the hatchling build backend used for sdist builds. Dependabot (uv ecosystem, 7-day cooldown) already keeps the lockfile fresh within these bounds. Companion to the socket-python-cli dependency pinning work (CE-359). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
Seed a changelog in the socket-python-cli format, starting at 3.4.3, with a pointer to GitHub releases for earlier history. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
Import all 53 published releases (v1.0.15 through v3.4.2) from the auto-generated GitHub release notes: one dated entry per version, pre-releases labeled, body headings demoted one level so version headings stay the top-level structure. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
The new requests floor is a newly binding constraint for consumers on older versions, so this warrants a minor bump rather than a patch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Incomplete package version bump
- Updated pyproject.toml and uv.lock from 3.4.2 to 3.5.0 so packaging metadata matches socketdev/version.py and CHANGELOG.md.
Or push these changes by commenting:
@cursor push 804710c344
Preview (804710c344)
diff --git a/pyproject.toml b/pyproject.toml
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@
[project]
name = "socketdev"
-version = "3.4.2"
+version = "3.5.0"
requires-python = ">= 3.9"
dependencies = [
'requests>=2.32.5,<3',
diff --git a/uv.lock b/uv.lock
--- a/uv.lock
+++ b/uv.lock
@@ -1353,7 +1353,7 @@
[[package]]
name = "socketdev"
-version = "3.4.2"
+version = "3.5.0"
source = { editable = "." }
dependencies = [
{ name = "requests" },You can send follow-ups to the cloud agent here.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 934d491. Configure here.
| dependencies = [ | ||
| 'requests', | ||
| 'typing-extensions>=4.12.2' | ||
| 'requests>=2.32.5,<3', |
There was a problem hiding this comment.
Incomplete package version bump
High Severity
The [project].version in pyproject.toml remains 3.4.2, while socketdev/version.py and CHANGELOG.md are updated to 3.5.0. Because the pyproject.toml version is static, this mismatch causes packaging metadata and uv.lock to reflect 3.4.2, even though runtime __version__ reports 3.5.0. This discrepancy can block or mis-publish the intended release.
Reviewed by Cursor Bugbot for commit 934d491. Configure here.
| @@ -1,14 +1,14 @@ | |||
| [build-system] | |||
| requires = ["hatchling"] | |||
| requires = ["hatchling==1.31.0"] | |||
There was a problem hiding this comment.
Build pin breaks Python 3.9
Medium Severity
Pinning hatchling==1.31.0 in [build-system] introduces a conflict: this version requires Python 3.10+, while requires-python still supports 3.9. This prevents builds and installs on Python 3.9 environments.
Reviewed by Cursor Bugbot for commit 934d491. Configure here.



Summary
Companion to the socket-python-cli dependency pinning work (SocketDev/socket-python-cli#289). The SDK's runtime dependencies were under-constrained:
requestswas fully unbounded — a fresh install could resolve to any just-published release, which is both a supply-chain exposure and a problem for consumers running Socket Firewall with a cooldown policy.typing-extensions>=4.12.2had no upper bound.hatchlingbuild backend was unpinned for sdist builds.Changes
requests>=2.32.5,<3andtyping-extensions>=4.12.2,<5— floors match the versions already resolved and tested inuv.lock; ceilings exclude the next major.hatchling==1.31.0in[build-system](isolated build env, so an exact pin can't conflict with consumer environments).uv lockregenerated.CHANGELOG.md(the repo had none) in the socket-python-cli format: a curated 3.5.0 entry, plus the full history backfilled from the auto-generated GitHub release notes (all 53 published releases, dated, pre-releases labeled).Why bounded ranges instead of exact pins
socketdev is a library, so it deliberately gets the library-appropriate version of the CLI's hardening rather than a copy of it. Exact
==pins in a library's metadata become resolver constraints in every consumer's environment: socket-python-cli 2.6.0+ pins its entire runtime closure exactly (e.g.requests==2.34.2), and if this package pinnedrequests==2.32.5, every CLI install would fail with an unsatisfiable conflict — likewise for any downstream user who pins their own dependencies. Ranges here + exact pins in applications compose; pins in both places must move in lockstep forever.Reproducibility for this repo's own development and CI is already handled where it belongs: the committed
uv.lock(enforced withuv sync --lockedin CI) and Dependabot on the uv ecosystem with a 7-day cooldown.Testing
uv lockregenerated cleanly; only the project version entry changed (both floors were already the locked versions).Ref: CE-359
Note
Low Risk
Dependency and packaging metadata only; no SDK runtime code changes, though the new
requestsfloor may affect installs on olderrequestsversions.Overview
Release 3.5.0 tightens packaging metadata and documents it: runtime deps in
pyproject.tomlare nowrequests>=2.32.5,<3(was unbounded) andtyping-extensions>=4.12.2,<5(no prior upper cap), with matchingrequires-distupdates inuv.lock. The sdist build backend is pinned tohatchling==1.31.0in[build-system].socketdev/version.pyis bumped to 3.5.0 (minor, because the newrequestsfloor can reject older consumer installs). A newCHANGELOG.mdadds a curated 3.5.0 section and backfills prior releases from GitHub release notes.Reviewed by Cursor Bugbot for commit 934d491. Configure here.