Repository: brainglobe/morphapi (language: python)

Issue:
Update to Python 3.12
Requires https://github.com/brainglobe/morphapi/issues/67


Discussion / hints:

Fix patch:
diff --git a/pyproject.toml b/pyproject.toml
index 23734c9..33cc932 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -29,6 +29,7 @@ classifiers = [
     "Programming Language :: Python :: 3",
     "Programming Language :: Python :: 3.10",
     "Programming Language :: Python :: 3.11",
+    "Programming Language :: Python :: 3.12",
     "Operating System :: OS Independent",
     "License :: OSI Approved :: MIT License",
 ]
@@ -71,7 +72,7 @@ exclude = ["tests*", "examples*"]
 addopts = "--cov=morphapi"
 
 [tool.black]
-target-version = ['py310','py311']
+target-version = ['py310','py311', 'py312']
 skip-string-normalization = false
 line-length = 79
 
@@ -97,13 +98,14 @@ select = ["I", "E", "F"]
 [tool.tox]
 legacy_tox_ini = """
 [tox]
-envlist = py{310,311}
+envlist = py{310,311,312}
 isolated_build = True
 
 [gh-actions]
 python =
     3.10: py310
     3.11: py311
+    3.12: py312
 
 [testenv]
 extras =


Test patch:
diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml
index 328ce9b..bcd6292 100644
--- a/.github/workflows/test_and_deploy.yml
+++ b/.github/workflows/test_and_deploy.yml
@@ -28,15 +28,15 @@ jobs:
       matrix:
         # Run all supported Python versions on linux
         os: [ubuntu-latest]
-        python-version: ["3.10", "3.11"]
+        python-version: ["3.10", "3.11", "3.12"]
         # Include one windows and two macOS (intel based and arm based) runs
         include:
           - os: macos-13
-            python-version: "3.11"
+            python-version: "3.12"
           - os: macos-latest
-            python-version: "3.11"
+            python-version: "3.12"
           - os: windows-latest
-            python-version: "3.11"
+            python-version: "3.12"
 
     steps:
       # Run tests