Skip to content

Conversation

@BrandtKruger
Copy link
Contributor

@BrandtKruger BrandtKruger commented Nov 26, 2025

fix: make isort conditional to maintain Python 3.9 compatibility

  • 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 #126 (isort v7 upgrade).

Checklist

🛟 If you need help, consider asking for advice over in the Kinde community.

renovate bot and others added 2 commits October 11, 2025 13:35
- 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.
@BrandtKruger BrandtKruger requested a review from a team as a code owner November 26, 2025 17:23
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Walkthrough

Comments added to requirements.txt documenting conditional isort versioning based on Python version, editable dev install instructions, and Python 3.9 CI/CD compatibility notes. Existing isort dependency specification unchanged.

Changes

Cohort / File(s) Summary
Documentation comments
requirements.txt
Added explanatory comments regarding isort version conditionals, editable mode installation guidance, and Python 3.9 compatibility for CI/CD without modifying actual dependency versions

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: fixing isort Python 3.9 compatibility, which matches the primary objective of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description clearly explains the conditional isort installation requirements for different Python versions and the backwards compatibility goals.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link

@dtoxvanilla1991 dtoxvanilla1991 left a 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

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 isort from requirements.txt entirely (and ensure all pipelines use the extras path).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants