-
Notifications
You must be signed in to change notification settings - Fork 1
feat: upgrade to Python 3.12+ only support #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Update CI matrix to use Python 3.12 and 3.13 only - Remove Python 3.10 and 3.11 support from all configurations - Update pyproject.toml files to require Python >=3.12 - Update Black/Ruff target versions to py312 - Update all documentation to reflect Python 3.12+ requirement - Fix numpy 2.3.4 compatibility issues with older Python versions This resolves CI failures caused by numpy 2.3.4 not being available for Python 3.10, and aligns with modern Python ecosystem requirements. Breaking Change: Python 3.10 and 3.11 are no longer supported. Users must upgrade to Python 3.12 or later.
- Update prompt-toolkit from 3.0.52 to 3.0.51 to resolve conflict with commitizen - Regenerate requirements-dev.txt with pip-compile to ensure compatibility - Fixes pre-push hook failure caused by dependency resolution conflicts
📝 WalkthroughWalkthroughPython support updated from 3.10/3.11/3.12 to 3.12/3.13 across CI matrices, project metadata, formatting/lint tool targets, and development dependency adjustments; client package version bumped to 0.2.0 and minimum Python requirement raised to >=3.12. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (8)requirements*.txt📄 CodeRabbit inference engine (.cursor/rules/cicd.mdc)
Files:
**/*📄 CodeRabbit inference engine (.cursor/rules/security.mdc)
Files:
{pyproject.toml,requirements*.txt,Pipfile*,package*.json,pnpm-lock.yaml,uv.lock}⚙️ CodeRabbit configuration file
Files:
clients/python/**📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Files:
⚙️ CodeRabbit configuration file
Files:
**/pyproject.toml📄 CodeRabbit inference engine (.cursor/rules/security.mdc)
Files:
clients/**/*📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
pyproject.toml📄 CodeRabbit inference engine (.cursor/rules/cicd.mdc)
Files:
{requirements.txt,pyproject.toml,**/*.{yaml,yml}}📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
🧠 Learnings (3)📚 Learning: 2025-10-23T13:26:37.198ZApplied to files:
📚 Learning: 2025-10-23T13:26:37.198ZApplied to files:
📚 Learning: 2025-10-23T13:28:42.367ZApplied to files:
🔇 Additional comments (7)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
pyproject.toml (1)
1-91: Add mypy strict mode configuration.Coding guidelines require mypy strict mode with pydantic plugin enabled. Add configuration after the ruff sections.
[tool.flake8] max-line-length = 88 +[tool.mypy] +strict = true +plugins = ["pydantic.mypy"] + +[tool.mypy.overrides] +module = "tests.*" +disallow_untyped_defs = false + [build-system]clients/python/pyproject.toml (1)
56-104: Add mypy strict mode configuration to client library.Same as root: mypy strict mode with pydantic plugin is required per coding guidelines.
[tool.flake8] max-line-length = 88 + +[tool.mypy] +strict = true +plugins = ["pydantic.mypy"] + +[tool.mypy.overrides] +module = "tests.*" +disallow_untyped_defs = falserequirements-dev.txt (1)
1-160: Add mypy to requirements-dev.in and recompile.The root cause is that mypy is declared in both pyproject.toml files but missing from requirements-dev.in. Since pip-compile generates output only from entries in the source file, mypy won't appear in requirements-dev.txt until added to requirements-dev.in. Update requirements-dev.in to include
mypy>=1.8.0(to align with clients/python/pyproject.toml) and recompile with:pip-compile requirements-dev.in --output-file=requirements-dev.txt.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (6)
README.mdis excluded by!**/*.mdand included by noneclients/python/README.mdis excluded by!**/*.mdand included byclients/**docs/ci-cd.mdis excluded by!docs/**,!**/*.mdand included by nonedocs/deployment.mdis excluded by!docs/**,!**/*.mdand included by nonedocs/development.mdis excluded by!docs/**,!**/*.mdand included by nonedocs/renovate.mdis excluded by!docs/**,!**/*.mdand included by none
📒 Files selected for processing (4)
.github/workflows/ci.yml(2 hunks)clients/python/pyproject.toml(3 hunks)pyproject.toml(2 hunks)requirements-dev.txt(4 hunks)
🧰 Additional context used
📓 Path-based instructions (11)
.github/workflows/**/*.y?(a)ml
📄 CodeRabbit inference engine (.cursor/rules/security.mdc)
Run regular dependency security audits (pip-audit, safety) in CI
Files:
.github/workflows/ci.yml
.github/workflows/*.{yml,yaml}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Pin setuptools to < 81 in CI workflows until pkg_resources deprecation is resolved
Files:
.github/workflows/ci.yml
.github/**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
.github/**/*: CI/CD workflows must follow least-privilege and restricted-policy IaC security practices
Use safe defaults in CI/CD (no hard-coded secrets, pinned images, versioned modules)
Follow container best practices in CI (non-root, slim images, healthchecks)
Restrict network exposure and ports in CI/CD
Apply Kubernetes/Helm best practices in CI/CD (resource limits, probes, RBAC)
Files:
.github/workflows/ci.yml
⚙️ CodeRabbit configuration file
.github/**/*: Verify least-privilege permissions, pinned actions SHAs, secret usage, concurrency/cancellation,
and fast-fail patterns. Suggest caching and matrix splits where build times benefit.
Files:
.github/workflows/ci.yml
clients/python/**
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Update Python client interfaces and examples to match API changes
Files:
clients/python/pyproject.toml
⚙️ CodeRabbit configuration file
clients/python/**: Ensure session reuse, timeouts, and exception taxonomy maps cleanly for downstream users.
Check docstrings and typing for public functions; verify parity with OpenAPI.
Files:
clients/python/pyproject.toml
**/pyproject.toml
📄 CodeRabbit inference engine (.cursor/rules/security.mdc)
Pin Python dependencies in pyproject.toml (exact versions, ideally with hashes)
Files:
clients/python/pyproject.tomlpyproject.toml
**/*
📄 CodeRabbit inference engine (.cursor/rules/security.mdc)
Avoid committing content matching common secret patterns (e.g., sk-..., AKIA..., ghp_..., password='...')
Files:
clients/python/pyproject.tomlrequirements-dev.txtpyproject.toml
clients/**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
clients/**/*: Client libraries should follow sound API client design patterns
Client libraries must implement error handling and retry logic where appropriate
Ensure type safety and clear interfaces in client libraries
Provide documentation and examples for client libraries
Maintain cross-platform compatibility in client libraries
Files:
clients/python/pyproject.toml
requirements*.txt
📄 CodeRabbit inference engine (.cursor/rules/cicd.mdc)
Use requirements*.txt in workflows as cache key inputs and installation sources; keep them present and up to date
Files:
requirements-dev.txt
{pyproject.toml,requirements*.txt,Pipfile*,package*.json,pnpm-lock.yaml,uv.lock}
⚙️ CodeRabbit configuration file
{pyproject.toml,requirements*.txt,Pipfile*,package*.json,pnpm-lock.yaml,uv.lock}: Flag vulnerable or unpinned deps; suggest safer alternatives; check tool configs (ruff, mypy, pytest, coverage).
Files:
requirements-dev.txtpyproject.toml
pyproject.toml
📄 CodeRabbit inference engine (.cursor/rules/cicd.mdc)
Pin Python dependencies with exact versions (==) or constrained ranges in pyproject.toml, including dev extras
pyproject.toml: Configure ruff, mypy (strict), and black (line length 88, target py310) in pyproject.toml as specified
Bump project version in pyproject.toml for breaking changes
pyproject.toml: Ruff configuration must select: E,F,I,B,UP,C4,PIE,SIM,T20,ASYNC,S,RUF,S603,SIM115,RUF006; with specified per-file ignores
Enable mypy plugin pydantic.mypy and override tests.* disallow_untyped_defs=false
Files:
pyproject.toml
{requirements.txt,pyproject.toml,**/*.{yaml,yml}}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
{requirements.txt,pyproject.toml,**/*.{yaml,yml}}: Keep dependencies secure and appropriately versioned in configuration files
Follow configuration best practices in config files
Assess security implications of configuration changes
Ensure proper formatting and structure in configuration files
Files:
pyproject.toml
🧠 Learnings (3)
📚 Learning: 2025-10-23T13:26:37.198Z
Learnt from: CR
PR: VirtualAgentics/ConextForge_memory#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-10-23T13:26:37.198Z
Learning: Applies to pyproject.toml : Configure ruff, mypy (strict), and black (line length 88, target py310) in pyproject.toml as specified
Applied to files:
clients/python/pyproject.tomlpyproject.toml
📚 Learning: 2025-10-23T13:28:42.367Z
Learnt from: CR
PR: VirtualAgentics/ConextForge_memory#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-10-23T13:28:42.367Z
Learning: Applies to **/*.py : Follow PEP 8 with an 88-character line limit (ruff/black-enforced)
Applied to files:
clients/python/pyproject.tomlpyproject.toml
📚 Learning: 2025-10-23T13:26:37.198Z
Learnt from: CR
PR: VirtualAgentics/ConextForge_memory#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-10-23T13:26:37.198Z
Learning: Applies to pyproject.toml : Bump project version in pyproject.toml for breaking changes
Applied to files:
pyproject.toml
🔇 Additional comments (6)
pyproject.toml (2)
3-3: Tool versions correctly updated to py312.Black and ruff target versions are appropriately updated to reflect Python 3.12+ support.
Also applies to: 7-7
53-78: Requires-python and dependency pinning are correct.Python requirement correctly set to >=3.12 and all dependencies are pinned with exact versions.
clients/python/pyproject.toml (2)
10-26: Python version metadata correctly updated.Requires-python and classifiers properly reflect 3.12+ support.
1-3: Build system and dependencies are appropriate.Setuptools constraint is conservative and dependencies use sensible ranges.
Also applies to: 27-40
.github/workflows/ci.yml (1)
18-18: CI matrix and workflow configuration correct.Python version matrix properly reduced to 3.12 and 3.13. Single-job workflows appropriately pinned to 3.12. Action SHAs are pinned and permissions are minimal.
Also applies to: 56-56, 91-91, 175-175
requirements-dev.txt (1)
35-35: Dependency downgrades are safe and documented appropriately.All three downgrades have been verified:
- cyclonedx-python-lib 9.1.0 has no known security vulnerabilities
- wrapt 1.17.3 is stable (1.17.0+ requires Python 3.8+); no breaking changes relative to 2.0.0
- prompt-toolkit 3.0.51 is used because commitizen excludes version 3.0.52 due to a questionary compatibility issue
The downgrades appear to result from pip-compile resolving transitive dependency conflicts. No security vulnerabilities exist in the selected versions.
- Bump version to 0.2.0 for breaking change (Python 3.10/3.11 support removal) - Update both main and client pyproject.toml versions - Fix requirements-dev.txt comment to reference correct output filename - Addresses all CodeRabbit review feedback
🐍 Python 3.12+ Only Support Upgrade
This PR upgrades the project to require Python 3.12+ only, removing support for Python 3.10 and 3.11.
🎯 Problem Solved
📋 Changes Made
CI Configuration
.github/workflows/ci.ymlmatrix to use Python 3.12 and 3.13 onlyProject Configuration
requires-python = ">=3.12"to mainpyproject.tomlpyproject.tomlto require Python >=3.12py312Documentation Updates
Dependency Resolution
🧪 Testing
Python 3.10 and 3.11 are no longer supported. Users must upgrade to Python 3.12 or later.
🚀 Benefits
📊 Python Lifecycle Context
This change positions the project for long-term sustainability while resolving immediate CI issues.
Summary by CodeRabbit