djangorestframework-api-key currently declares Django 4.2 and Python 3.11 as the latest supported versions. Aside from an easily fixable test failure (details below), a local pytest run suggests that everything works on Django 5.0 and Python 3.12. I'd be happy to submit a PR for these minor changes.
Details of minor test failures: three parametrized tests (tests/test_model.py::test_has_expired) fail with the following type error:
TypeError: can't compare offset-naive and offset-aware datetimes
This error is rooted in a change to the default behavior of the USE_TZ setting in 5.0. Based on Django's own defaults and recommendations, changing to use timezones by default (in conftest.py and dateutils.py) seems reasonable, but setting USE_TZ to False also gets tests passing consistently across versions.
djangorestframework-api-key
currently declares Django 4.2 and Python 3.11 as the latest supported versions. Aside from an easily fixable test failure (details below), a localpytest
run suggests that everything works on Django 5.0 and Python 3.12. I'd be happy to submit a PR for these minor changes.Details of minor test failures: three parametrized tests (
tests/test_model.py::test_has_expired
) fail with the following type error:This error is rooted in a change to the default behavior of the
USE_TZ
setting in 5.0. Based on Django's own defaults and recommendations, changing to use timezones by default (inconftest.py
anddateutils.py
) seems reasonable, but settingUSE_TZ
toFalse
also gets tests passing consistently across versions.