-
Notifications
You must be signed in to change notification settings - Fork 24
Fix/isort python39 compatibility #142
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
base: main
Are you sure you want to change the base?
Fix/isort python39 compatibility #142
Conversation
- Add conditional isort installation in [project.optional-dependencies] - Python 3.10+: isort >=7.0.0 - Python 3.9: isort >=5.12.0, <7.0 - Remove hardcoded isort from [tool.poetry.dev-dependencies] - Update requirements.txt with documentation comment - Maintains backwards compatibility with Python 3.9 while allowing Python 3.10+ users to use isort v7 Fixes Python 3.9 CI/CD compatibility issue with isort v7 upgrade. This PR builds on top of PR kinde-oss#126 (isort v7 upgrade) and adds Python 3.9 compatibility.
WalkthroughComments added to Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🔇 Additional comments (1)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
dtoxvanilla1991
left a comment
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.
Line 34 currently pins isort>=5.12.0 unconditionally in requirements.txt, so any workflow that still relies on pip install -r requirements.txt (many CI jobs do) will keep pulling the 5.x series even on Python 3.10+. That contradicts the PR’s stated goal of allowing 3.10+ to use isort 7.
If you really expect everyone—including automation—to switch to pip install -e ".[dev]", then yes, that isort line should be removed so there isn’t a conflicting requirement. But before dropping it, confirm that no CI/CD paths still consume requirements.txt; otherwise you’ll lose isort entirely there. A safer alternative is to keep entries in requirements.txt but mirror the conditional markers already used in pyproject.toml,
| # Python 3.10+: isort >=7.0.0, Python 3.9: isort >=5.12.0, <7.0 | ||
| # For conditional installation, use: pip install -e ".[dev]" | ||
| # This line maintains Python 3.9 compatibility for CI/CD | ||
| isort>=5.12.0 |
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.
We currently still pin isort>=5.12.0 unconditionally in requirements.txt, so any workflow that still relies on pip install -r requirements.txt (many CI jobs do) will keep pulling the 5.x series even on Python 3.10+. That contradicts the PR’s stated goal of allowing 3.10+ to use isort 7.
If you really expect everyone - including automation - to switch to pip install -e ".[dev]", that isort line should be removed so there isn’t a conflicting requirement. But before dropping it, confirm that no CI/CD paths still consume requirements.txt; otherwise we’ll lose isort entirely there. A safer alternative is to keep entries in requirements.txt but mirror the conditional markers already used in pyproject.toml. To align intent and behavior you either:
- Add the same conditional markers to
requirements.txt, or - Remove
isortfromrequirements.txtentirely (and ensure all pipelines use the extras path).
fix: make isort conditional to maintain Python 3.9 compatibility
Python 3.10+ users to use isort v7
Fixes Python 3.9 CI/CD compatibility issue with isort v7 upgrade.
This PR builds on top of PR #126 (isort v7 upgrade).
Checklist
🛟 If you need help, consider asking for advice over in the Kinde community.