Repository: KCL-BMEIS/pymagewell (language: python)

Issue:
Python 3.11 support
Condaforge bots unable to build on 3.11 because of mutable dataclass field with a default argument (see [here](https://stackoverflow.com/questions/53632152/why-cant-dataclasses-have-mutable-defaults-in-their-class-attributes-declaratio).

Offending class: `ProCaptureSettings`
Offending field: `dimensions`
Python 3.11 support
Condaforge bots unable to build on 3.11 because of mutable dataclass field with a default argument (see [here](https://stackoverflow.com/questions/53632152/why-cant-dataclasses-have-mutable-defaults-in-their-class-attributes-declaratio).

Offending class: `ProCaptureSettings`
Offending field: `dimensions`
Python 3.11 support
Condaforge bots unable to build on 3.11 because of mutable dataclass field with a default argument (see [here](https://stackoverflow.com/questions/53632152/why-cant-dataclasses-have-mutable-defaults-in-their-class-attributes-declaratio).

Offending class: `ProCaptureSettings`
Offending field: `dimensions`


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/pymagewell-linters.yml b/.github/workflows/pymagewell-linters.yml
index 8aeb88e..77cd47a 100644
--- a/.github/workflows/pymagewell-linters.yml
+++ b/.github/workflows/pymagewell-linters.yml
@@ -15,7 +15,7 @@ jobs:
     strategy:
 
       matrix:
-        python-version: ["3.10"]
+        python-version: ["3.11"]
 
     steps:
     - uses: actions/checkout@v2
diff --git a/pymagewell/pro_capture_device/device_settings.py b/pymagewell/pro_capture_device/device_settings.py
index 919bd3e..02f3766 100644
--- a/pymagewell/pro_capture_device/device_settings.py
+++ b/pymagewell/pro_capture_device/device_settings.py
@@ -107,13 +107,13 @@ class ImageCoordinateInPixels:
     col: int
 
 
-@dataclass
+@dataclass(frozen=True)
 class ImageSizeInPixels:
     cols: int
     rows: int
 
 
-@dataclass
+@dataclass(frozen=True)
 class AspectRatio:
     hor: int
     ver: int
diff --git a/setup.cfg b/setup.cfg
index 4ad4611..d8c943d 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -39,9 +39,9 @@ package_dir =
   =.
 include_package_data = True
 install_requires =
- numpy>=1.21.4
+ numpy>=1.23.4
  pywin32>=303; platform_system=="Windows"
- opencv-python>=4.5.5
+ opencv-python>=4.6.0
 
 python_requires = >=3.8
 
@@ -61,7 +61,7 @@ dev =
  flake8 == 4.0
  flake8-bugbear == 21.9.2
  black == 22.3.0
- mypy == 0.931
+ mypy == 0.982
 doc =
  pdoc == 8.0.1
 


Test patch:
diff --git a/.github/workflows/pymagewell-unit-tests.yml b/.github/workflows/pymagewell-unit-tests.yml
index df0c976..cd59e48 100644
--- a/.github/workflows/pymagewell-unit-tests.yml
+++ b/.github/workflows/pymagewell-unit-tests.yml
@@ -16,7 +16,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        python-version: ["3.9", "3.10"]
+        python-version: ["3.9", "3.10", "3.11"]
 
     steps:
     - uses: actions/checkout@v2