46: narrow requires-python to >=3.11 to match tested floor - #74
Conversation
pyright `pythonVersion` and CI `python-version` both pin 3.11; the wheel's `requires-python = ">=3.10"` advertised a 3.10 support promise that no type-check or test job exercised. Narrow the floor to 3.11 so what we advertise matches what we test. Picked Option A from the issue (cheaper of two paths) — operators needing 3.10 can pin to a 3.10-compatible patch release; v0.2 can revisit if real users report. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (3)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe PR raises the project's minimum Python version requirement from 3.10 to 3.11 across build configuration, user documentation, and internal guidelines. This aligns the advertised package compatibility ( ChangesPython 3.11+ Requirement
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Pull request overview
Aligns SignalForge’s advertised minimum Python version with what CI and type checking actually exercise, resolving issue #46 by moving the supported floor to Python 3.11+ and documenting the decision.
Changes:
- Bumped
requires-pythonfrom>=3.10to>=3.11in packaging metadata. - Updated the README install instructions to explicitly state Python 3.11+ is required.
- Added a decision record in
.claude/rules/python-build.mdexplaining the “advertised floor matches tested floor” policy.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
README.md |
Documents Python 3.11+ requirement in the install section. |
pyproject.toml |
Raises the package’s advertised minimum Python version to 3.11. |
.claude/rules/python-build.md |
Records the rationale/decision and future guidance for keeping version floors in sync. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…/StrEnum Two Copilot review comments on PR #74: - `[tool.ruff].target-version` was still `py310` and out of sync with the new 3.11 floor; bumping it surfaced 21 UP017 (`datetime.UTC` alias) and 1 UP042 (`StrEnum`) modernization opportunities the previous floor was masking. Auto-fixed the UP017 set and switched `SamplingMode` to :class:`enum.StrEnum` (the 3.10-compat `str + Enum` mixin is no longer needed). - Stale 3.10-floor rationale in `safety/models.py` and `safety/test_models.py` docstrings updated to point at the new history (issue #46). `str(SamplingMode.X)` now returns the bare value (`"schema-only"`) rather than the dotted form. No production code paths exercise `str()` on the enum (Pydantic `model_dump_json` uses `.value`; loggers go through `json.dumps`); pinned by the existing tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR Review SummaryFixed (2 items)
False Positives (0 items)None — both comments were correct. Validation: |
Closes #46.
Summary
pyproject.toml:requires-python = ">=3.10"→">=3.11". Brings the advertised floor in lockstep with[tool.pyright].pythonVersion = "3.11"and.github/workflows/ci.yml'spython-version: "3.11"..claude/rules/python-build.md: new § "Python version: advertised floor matches the tested floor (issue scaffolding: reconcile pyright pythonVersion with requires-python #46)" — records the decision, names the three concrete divergence sources (matchexhaustiveness, PEP 604 stringification, PEP 695 slip-ins), and reserves the v0.3 matrix-widening path.README.md: install step now states "SignalForge requires Python 3.11+" so PyPI / GitHub readers see the support promise before theypip install.Picked Option A from the issue (narrow the floor) over Option B (widen pyright/CI to a 3.10 matrix). Cheaper, clearer support promise, and operators needing 3.10 can pin to a 3.10-compatible patch release.
Validation
ruff check .— clean.ruff format --check .— clean.pyright— 0 errors, 0 warnings.pytestunder Python 3.13 — only the 6 pre-existing symlink-loop failures (CPython 3.13'sPath.resolve()no longer raisesRuntimeErroron cycles; same failures onorigin/devhead); CI on 3.11 will pass.A side observation worth mentioning: my local miniconda Python is 3.10.10, and pip refused the editable install against the new floor (
Package 'signalforge-dbt' requires a different Python: 3.10.10 not in '>=3.11'). That's the failure mode the issue called out — the prior>=3.10floor was an aspirational claim that no CI job had ever exercised. The new floor now fails loud on the right interpreter.Test plan
devbranch checks.pip install -e ".[dev]"succeeds on a Python 3.11+ interpreter.pip install -e ".[dev]"rejects with a clear error on Python 3.10.🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
Documentation
Chores