Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ fastapi = [
flask = [
"flask >=3.0.0, <4.0.0",
]
dev = [
"pytest >=7.4.0",
"pytest-cov >=4.1.0",
"pytest-django >=4.5.2",
"mypy >=1.5.0",
"bandit >=1.7",
"pylint >=2.0",
"pycodestyle >=2.0",
"pytest-asyncio >=0.21.1",
"pytest-timeout >=2.2.0",
"black >=23.7.0",
"flake8 >=6.1.0",
"isort >=7.0.0; python_version >= '3.10'",
"isort >=5.12.0, <7.0; python_version < '3.10'",
]

[project.urls]
"Homepage" = "https://github.com/kinde-oss/kinde-python-sdk"
Expand Down Expand Up @@ -77,5 +92,8 @@ pytest-asyncio = "^0.21.1"
pytest-timeout = "^2.2.0"
black = "^23.7.0"
flake8 = "^6.1.0"
isort = "^5.12.0"
# isort is now conditionally installed based on Python version
# Python 3.10+: isort >=7.0.0
# Python 3.9: isort >=5.12.0, <7.0
# Install via: pip install -e ".[dev]"

4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ pytest-cov>=4.1.0
pytest-timeout>=2.2.0
black>=23.7.0
flake8>=6.1.0
# Note: isort version is conditional based on Python version in pyproject.toml [project.optional-dependencies]
# 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).

mypy>=1.5.0
PyYAML>=6.0.1
Expand Down