chore: feat: add Python 3.10 support [ENG-11910]#108
Conversation
- Update requires-python to >=3.10 - Add Python 3.10 classifier - Add Python 3.10 to CI test matrix
There was a problem hiding this comment.
Pull request overview
This PR adds Python 3.10 support to the stackone-ai package by lowering the minimum Python version requirement from 3.11 to 3.10, enabling the package to be used as a dependency in projects that support Python 3.10 (such as pydantic-ai).
Changes:
- Updated
requires-pythonconstraint from>=3.11to>=3.10in pyproject.toml - Added Python 3.10 classifier to package metadata
- Added Python 3.10 to the CI test matrix
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pyproject.toml | Updated minimum Python version requirement and added Python 3.10 classifier |
| .github/workflows/ci.yaml | Added Python 3.10 to CI test matrix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/ci.yaml
Outdated
| strategy: | ||
| matrix: | ||
| python-version: ["3.11", "3.13"] | ||
| python-version: ["3.10", "3.11", "3.13"] |
There was a problem hiding this comment.
The CI test matrix is missing Python 3.12, which is listed in the package classifiers (line 17). Consider adding "3.12" to the python-version matrix to ensure comprehensive testing across all supported Python versions declared in pyproject.toml.
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="pyproject.toml">
<violation number="1" location="pyproject.toml:6">
P2: Lowering `requires-python` to 3.10 while keeping Ruff’s `target-version = "py311"` means linting will still allow 3.11-only syntax, undermining the new 3.10 support. Consider aligning `target-version` with the new minimum or removing it to let `requires-python` drive Ruff’s version checks.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
- Use timezone.utc instead of datetime.UTC (introduced in Python 3.11) - Update ruff target-version from py311 to py310 - Remove unused ty: ignore comments for unresolved-import - Add ty: ignore for deprecated langgraph.prebuilt.create_react_agent
Summary
requires-pythonfrom>=3.11to>=3.10Motivation
This allows stackone-ai to be used as a dependency in projects that support Python 3.10, such as pydantic-ai which requires Python >=3.10.
Test plan
Summary by cubic
Add Python 3.10 support by setting requires-python >=3.10, adding the 3.10 classifier, and testing 3.10/3.11/3.12/3.13 in CI. Also update code and tooling for 3.10 compatibility (use timezone.utc, set Ruff target to py310, and tidy langgraph imports, including ty: ignore for deprecated create_react_agent).
Written for commit f0549c8. Summary will update on new commits.