deps(sdks): raise runtime floors off EOL Node 18 / Python 3.9 (F15)#137
Merged
Conversation
Bump engines.node from >=18 to >=20 in the TypeScript SDK (Node 18 EOL April 2025). Bump requires-python from >=3.9 to >=3.10 in the Python SDK (Python 3.9 EOL October 2025), drop the Python 3.9 classifier, and update mypy python_version + ruff target-version to 3.10. Update uv.lock to reflect the new requires-python floor. Note: ruff UP035 violation now flagged in src/logwell/types.py (Callable import from typing instead of collections.abc) — deferred as a follow-up pyupgrade modernization task per plan STOP conditions. All 310 Python tests pass; TS build emits CJS+ESM+types.
Move `Callable` from `typing` to `collections.abc` under a `TYPE_CHECKING` guard in `sdks/python/src/logwell/types.py`. This is the idiomatic fix ruff --fix would apply for UP035 (import from collections.abc instead of typing) and TC003 (move stdlib import into type-checking block). The file uses `from __future__ import annotations` so the guarded import is safe at runtime. Also amend `plans/004-raise-sdk-runtime-floors.md` to: - Add `sdks/python/uv.lock` and `sdks/python/src/logwell/types.py` to the explicit in-scope file list (uv.lock is a natural side-effect of the requires-python floor bump; the Callable fix resolves the STOP-condition violation rather than deferring it) - Update done-criteria and STOP conditions to match actual scope - Update maintenance notes for reviewer
… in PR, not by editing the plan)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan 004 — Raise SDK runtime floors off EOL Node 18 / Python 3.9 (finding F15)
Node 18 (EOL Apr 2025) and Python 3.9 (EOL Oct 2025) are advertised as supported floors. This drops the already-unsupported runtimes (a semver-minor for the published packages).
Changes
engines.node>=18.0.0→>=20.0.0.requires-python>=3.9→>=3.10; drop thePython :: 3.9classifier;[tool.mypy] python_versionand[tool.ruff] target-version→3.10/py310.python<3.10resolution branches;uv lock --checkpasses).Callablemoved fromtypingtocollections.abcunder aTYPE_CHECKINGblock.Why the one source change (deviation from plan scope, called out explicitly)
The plan scoped source files out and said to defer ruff
UPfindings. But the SDK Python CI (sdk-python.yml) runsruff check src tests, and bumpingtarget-versiontopy310activates UP035 (deprecatedtyping.Callable). So CI literally cannot go green at py310 without this fix. The change is provably safe: the module hasfrom __future__ import annotations(PEP 563 → annotations are strings, never evaluated at runtime) andCallableis used only inTypedDictfield annotations, so guarding it underTYPE_CHECKINGintroduces zero runtime behavior change. No other source was touched; the plan's handoff doc was left unmodified.Verification (exact CI commands re-run locally)
bun run check,bun run test(161),bun run build(CJS+ESM+DTS),attw→ all greenruff check src tests,ruff format --check,mypy --strict src,pytest --cov-fail-under=90(92.65%) → all greenversionfields bumped; CI matrices already target py3.10–3.13 and Node 24 (compatible).Implemented by Sonnet 4.6 (high), reviewed by Opus 4.8 (xhigh) — 1 fix round.