-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python 3.8 support and better tooling.
- Reintroduced support for Python 3.8. Seems as I have to support than I want to. - Added justfile to ease management of package and dev environment.
- Loading branch information
1 parent
00eb222
commit 14bf6da
Showing
9 changed files
with
117 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,44 @@ | ||
# type: ignore | ||
|
||
import nox | ||
import tomllib | ||
|
||
with open("pyproject.toml", "rb") as f: | ||
project_data = tomllib.load(f)["project"] | ||
|
||
# Read supported Python versions from pyproject.toml | ||
python_versions = [] | ||
for classifier in project_data["classifiers"]: | ||
if "Programming Language" in classifier and "Python" in classifier: | ||
split_classifier = classifier.split("::") | ||
if len(split_classifier) == 3: | ||
python_versions.append(split_classifier[2].strip()) | ||
|
||
# Read supported Django versions from pyproject.toml | ||
django_versions = [] | ||
for classifier in project_data["classifiers"]: | ||
if "Framework" in classifier and "Django" in classifier: | ||
split_classifier = classifier.split("::") | ||
if len(split_classifier) == 3: | ||
django_versions.append(split_classifier[2].strip()) | ||
|
||
invalid_combinations = [("3.8", "5.0"), ("3.9", "5.0"), ("3.11", "3.2"), ("3.12", "3.2")] | ||
|
||
|
||
@nox.session() | ||
@nox.parametrize( | ||
"python, django", | ||
[ | ||
(python, tox_version) | ||
for python in ("3.9", "3.10", "3.11", "3.12") | ||
for tox_version in ("3.2", "4.2", "5.0") | ||
if ( | ||
(python, tox_version) != ("3.9", "5.0") | ||
and (python, tox_version) != ("3.11", "3.2") | ||
and (python, tox_version) != ("3.12", "3.2") | ||
) | ||
for python in python_versions | ||
for tox_version in django_versions | ||
if (python, tox_version) not in invalid_combinations | ||
], | ||
) | ||
def run_testsuite(session, django): | ||
if session.venv_backend == "uv": | ||
session.install("-r", "pyproject.toml", "--extra", "django-extensions", "--extra", "dev", ".") | ||
session.install("-r", "pyproject.toml", "--extra", "test", ".") | ||
else: | ||
session.install(".[django-extensions,dev]") | ||
session.install(".[test]") | ||
session.install(f"django~={django}") | ||
session.run("pytest", "--cov", "--cov-append", "--cov-report=") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "2.11.1" | ||
__version__ = "2.12.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters