Skip to content

Commit

Permalink
bump min Python version for main Django and add 5.2a1 (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuadavidthomas authored Jan 21, 2025
1 parent 5fac894 commit fb8b410
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
DJ42 = "4.2"
DJ50 = "5.0"
DJ51 = "5.1"
DJ52 = "5.2a1"
DJMAIN = "main"
DJMAIN_MIN_PY = PY310
DJ_VERSIONS = [DJ42, DJ50, DJ51, DJMAIN]
DJMAIN_MIN_PY = PY312
DJ_VERSIONS = [DJ42, DJ50, DJ51, DJ52, DJMAIN]
DJ_LTS = [DJ42]
DJ_DEFAULT = DJ_LTS[0]
DJ_LATEST = DJ_VERSIONS[-2]
Expand All @@ -36,7 +37,15 @@ def should_skip(python: str, django: str) -> bool:
"""Return True if the test should be skipped"""

if django == DJMAIN and version(python) < version(DJMAIN_MIN_PY):
# Django main requires Python 3.10+
# Django main requires Python 3.12+
return True

if django == DJ52 and version(python) < version(PY310):
# Django 5.2 requires Python 3.10+
return True

if django == DJ51 and version(python) < version(PY310):
# Django 5.1 requires Python 3.10+
return True

if django == DJ50 and version(python) < version(PY310):
Expand Down

0 comments on commit fb8b410

Please sign in to comment.