Repository: RealOrangeOne/zoloto (language: python)

Issue:
Python 3.10
I am unable to setup Zoloto on Python 3.10 as numpy doesn't support it until 1.22

Numpy release notes: https://numpy.org/doc/stable/release/1.22.0-notes.html


Discussion / hints:
The SR kit this year will be on Python 3.10, so please could you prioritise this?
Patch here: https://github.com/RealOrangeOne/zoloto/pull/298#pullrequestreview-1117470919

Fix patch:
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
index 0e00973..62e0bc5 100644
--- a/.github/workflows/benchmark.yml
+++ b/.github/workflows/benchmark.yml
@@ -16,7 +16,7 @@ jobs:
       - name: Set up Python
         uses: actions/setup-python@v1
         with:
-          python-version: 3.9
+          python-version: "3.10"
       - uses: actions/cache@v2
         with:
           path: ~/.cache/pip
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index aa1742e..e05d4ce 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -16,7 +16,7 @@ jobs:
       - name: Set up Python
         uses: actions/setup-python@v1
         with:
-          python-version: 3.9
+          python-version: "3.10"
       - uses: actions/cache@v2
         with:
           path: ~/.cache/pip
diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml
index 1c2cb55..61a4111 100644
--- a/.github/workflows/pypi.yml
+++ b/.github/workflows/pypi.yml
@@ -12,7 +12,7 @@ jobs:
       - name: Set up Python
         uses: actions/setup-python@v1
         with:
-          python-version: 3.9
+          python-version: "3.10"
       - name: Install dependencies
         run: |
           pip install --upgrade pip
diff --git a/dev-requirements.txt b/dev-requirements.txt
index 1ec94f4..59ac785 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -9,7 +9,7 @@ flake8-print>=3,<4
 flake8-tuple>=0.4,<1
 hypothesis==4.36.2
 mypy==0.910
-pytest==5.3.5
+pytest==7.1.3
 pytest-benchmark>=3,<4
 pytest-cov>=2,<3
 isort==4.3.21
diff --git a/setup.cfg b/setup.cfg
index 0e92372..369a560 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -17,6 +17,7 @@ classifiers =
     Programming Language :: Python :: 3
     Programming Language :: Python :: 3.8
     Programming Language :: Python :: 3.9
+    Programming Language :: Python :: 3.10
     Programming Language :: Python :: Implementation :: CPython
     Topic :: Scientific/Engineering
     Topic :: Scientific/Engineering :: Image Recognition


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 58d5fd6..44e3ea9 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -14,7 +14,7 @@ jobs:
     strategy:
       matrix:
         os: [ubuntu-latest]
-        python: [3.8, 3.9]
+        python: ["3.8", "3.9", "3.10"]
 
     steps:
       - uses: actions/checkout@v2
diff --git a/tests/test_marker.py b/tests/test_marker.py
index b7a1288..31315ee 100644
--- a/tests/test_marker.py
+++ b/tests/test_marker.py
@@ -173,18 +173,18 @@ def test_is_uncalibrated(self) -> None:
         with self.assertRaises(MissingCalibrationsError):
             self.marker._get_pose_vectors()
 
-    def __getattribute__(self, name: str) -> Any:
-        attr = super().__getattribute__(name)
-        if name in [
-            "test_orientation",
-            "test_distance",
-            "test_cartesian_coordinates",
-            "test_spherical_coordinates",
-        ]:
-
-            def test_raises(*args: Any, **kwargs: Any) -> None:
-                with self.assertRaises(MissingCalibrationsError):
-                    attr(*args, **kwargs)
-
-            return test_raises
-        return attr
+    def test_orientation(self) -> None:
+        with self.assertRaises(MissingCalibrationsError):
+            super().test_orientation()
+
+    def test_distance(self) -> None:
+        with self.assertRaises(MissingCalibrationsError):
+            super().test_distance()
+
+    def test_cartesian_coordinates(self) -> None:
+        with self.assertRaises(MissingCalibrationsError):
+            super().test_cartesian_coordinates()
+
+    def test_spherical_coordinates(self) -> None:
+        with self.assertRaises(MissingCalibrationsError):
+            super().test_spherical_coordinates()