feat: add Python 3.13 support#525
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughUpdates project tooling and dependency constraints (Python >=3.10,<3.14, Black targets), adjusts Typer CLI flag declaration and Config wildcard handling, and standardizes test CliRunner construction and test docstrings. ChangesPython version and CLI tooling alignment
🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pyproject.toml`:
- Line 27: The dependency constraint for the Typer package in the pyproject (the
line defining "typer = { extras = [\"all\"], version = \"...\" }") allows
versions older than 0.15.0 which lack Python 3.13 support; update that version
specifier to ">=0.15.0,<1" so the project requires Typer 0.15.0 or newer while
remaining below 1.0.
- Line 12: Update the Black configuration's target-version list in
pyproject.toml by adding 'py313' to the existing array (the key is
target-version) so it reads target-version = ['py310','py311','py312','py313'],
ensuring Black formats code for Python 3.13 as well as the other specified
versions.
- Line 31: The numpy dependency constraint in pyproject.toml currently allows
1.26.x which lacks Python 3.13 support; update the numpy entry to use
Python-version markers so projects on <3.13 keep 1.26.x and projects on >=3.13
get a compatible 2.x series (e.g., split the numpy key into two table entries
with version ranges tied to python = "<3.13" and python = ">=3.13" respectively,
using >=1.26.4,<1.27.0 for pre-3.13 and >=2.1.0,<3 for 3.13+).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 09678380-d426-4df9-8e59-5e88502fb9ed
📒 Files selected for processing (4)
pyproject.tomlrobusta_krr/main.pytests/test_krr.pytests/test_runner.py
- Add py313 to Black target-version list - Update typer constraint to >=0.15.0,<1 for Python 3.13 support - Add Python version markers for numpy: >=2.1.0 for py313, >=1.26.4 for older
|
@aantn Please review the changes and provide feedback. |
Description
This PR adds Python 3.13 compatibility to the project while maintaining backward compatibility with Python 3.10–3.12.
Changes
pyproject.toml
>=3.10,<=3.12.9to>=3.10,<3.14>=1.26.4,<1.27.0to>=1.26.4,<3(numpy 1.26.x does not support Python 3.13)==2.2.2to>=2.2.3,<4(pandas 2.2.2 fails to compile on Python 3.13)^0.7.0to>=0.9.0,<1(typer 0.7.0 is incompatible with click 8.4+ required by Python 3.13)robusta_krr/main.py
show_severityoption declaration: change" /--exclude-severity"to"--show-severity/--exclude-severity"— the old syntax causedTypeError: Secondary flag is not valid for non-boolean flagwith newer click versionsNoneguard fornamespacesandresourcesbefore checking"*" in valueto preventTypeErrorwhen these options are not providedtests/test_krr.py, tests/test_runner.py
mix_stderr=Falseargument fromCliRunner()— this parameter was removed in newer typer versions