Repository: ImperialCollegeLondon/django-drf-filepond (language: python)

Issue:
Add / check support for Python 3.12
Add support for Python 3.12, making any updates as necessary. Update the CI infrastructure to test against 3.12.


Discussion / hints:

Fix patch:
diff --git a/tox.ini b/tox.ini
index 855281a..61af5f6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,6 +10,12 @@
 ; since this complicated parallel runs via GHA. Since we're no longer
 ; using append (via pytest-cov), this means we also don't need an inital
 ; coverage clean step since previous coverage files are overwritten.
+
+; Virtualenv from 20.22.0 onwards drops support for Python <=3.6 so
+; specifying use of an older version, as detailed here:
+; https://tox.wiki/en/latest/faq.html#testing-end-of-life-python-versions
+requires = virtualenv<20.22.0
+
 envlist = 
     py27
     py35
@@ -19,6 +25,7 @@ envlist =
     py39
     py310
     py311
+    py312
     coverage
 
 [testenv]
@@ -56,5 +63,6 @@ depends =
     py39
     py310
     py311
+    py312
 
 ; pytest configuration is provided in pytest.ini


Test patch:
diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml
index 4262539..37d7120 100644
--- a/.github/workflows/python-test.yml
+++ b/.github/workflows/python-test.yml
@@ -27,7 +27,7 @@ jobs:
       fail-fast: false
       matrix:
         os: [ubuntu-20.04, ubuntu-latest]
-        python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11']
+        python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11', '3.12']
         exclude:
           - os: ubuntu-20.04
             python-version: '3.7'
@@ -39,6 +39,8 @@ jobs:
             python-version: '3.10'
           - os: ubuntu-20.04
             python-version: '3.11'
+          - os: ubuntu-20.04
+            python-version: '3.12'
           - os: ubuntu-latest
             python-version: '2.7'
           - os: ubuntu-latest
diff --git a/pytest.ini b/pytest.ini
index 1c54027..53c9bf3 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -14,3 +14,5 @@ filterwarnings =
     ignore:.*Python 2 is no longer supported by the Python core team\. Support for it is now deprecated in cryptography:UserWarning
     ignore:.*Python 3\.5 support will be dropped in the next release of cryptography:UserWarning
     ignore:.*Python 3\.6 is no longer supported by the Python core team\. Therefore, support for it is deprecated in cryptography:UserWarning
+    ; Ignore the deprecation warning for the use of datetime.utcnow() by the httpretty dependency
+    ignore:.*datetime\.datetime\.utcnow\(\) is deprecated and scheduled for removal in a future version\.:DeprecationWarning