Repository: qutech/qupulse (language: python)

Issue:
Increase minimal python version to 3.10



Discussion / hints:

Fix patch:
diff --git a/README.md b/README.md
index 358bb1c9..1ad4ccb7 100644
--- a/README.md
+++ b/README.md
@@ -41,7 +41,7 @@ python -m pip install -e git+https://github.com/qutech/qupulse.git#egg=qupulse[d
 which will clone the github repository to `./src/qupulse` and do an editable/development install.
 
 ### Requirements and dependencies
-qupulse requires at least Python 3.8 and is tested on 3.8, 3.9 and 3.10. It relies on some external Python packages as dependencies. 
+qupulse requires at least Python 3.10 and is tested on 3.10, 3.11 and 3.12. It relies on some external Python packages as dependencies. 
 We intentionally did not restrict versions of dependencies in the install scripts to not unnecessarily prevent usage of newer releases of dependencies that might be compatible. However, if qupulse does encounter problems with a particular dependency version please file an issue. 
 
 The backend for TaborAWGs requires packages that can be found [here](https://git.rwth-aachen.de/qutech/python-TaborDriver).
diff --git a/changes.d/835.removal b/changes.d/835.removal
new file mode 100644
index 00000000..cc2f7a5f
--- /dev/null
+++ b/changes.d/835.removal
@@ -0,0 +1,1 @@
+Remove python 3.8 and 3.9 support. Version 3.10 is now the minimal supported version.
\ No newline at end of file
diff --git a/pyproject.toml b/pyproject.toml
index fd747e3e..32f04eb7 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -8,7 +8,7 @@ dynamic = ["version"]
 description = "A Quantum compUting PULse parametrization and SEquencing framework"
 readme = "README.md"
 license = "GPL-3.0-or-later"
-requires-python = ">=3.8"
+requires-python = ">=3.10"
 authors = [
     { name = "Quantum Technology Group and Chair of Software Engineering, RWTH Aachen University" },
 ]
@@ -31,7 +31,9 @@ dependencies = [
     "lazy_loader",
     "numpy",
     "sympy>=1.1.1",
-    "gmpy2",
+    # This is required because there is no 3.12 compatible gmpy2 stable release as of 2024.06.20
+    "gmpy2;python_version<'3.12'",
+    "gmpy2>=2.2.0rc1;python_version>='3.12'"
 ]
 
 [project.optional-dependencies]
@@ -65,8 +67,7 @@ tests = [
     "pytest_benchmark",
 ]
 zurich-instruments = [
-    "qupulse-hdawg-legacy;python_version<'3.9'",
-    "qupulse-hdawg;python_version>='3.9'",
+    "qupulse-hdawg",
 ]
 
 [project.urls]


Test patch:
diff --git a/.github/workflows/pythontest.yaml b/.github/workflows/pythontest.yaml
index b67a0207..38cadd54 100644
--- a/.github/workflows/pythontest.yaml
+++ b/.github/workflows/pythontest.yaml
@@ -22,7 +22,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        python-version: ["3.8", "3.9", "3.10"]
+        python-version: ["3.10", "3.11", "3.12"]
     env:
       INSTALL_EXTRAS: tests,plotting,zurich-instruments,tektronix,tabor-instruments
 
diff --git a/tests/serialization_tests.py b/tests/serialization_tests.py
index 1ebd93b8..537e642c 100644
--- a/tests/serialization_tests.py
+++ b/tests/serialization_tests.py
@@ -1527,8 +1527,8 @@ def test_convert_stored_pulse_in_storage_dest_not_empty_id_overlap(self) -> None
             with self.assertRaises(ValueError):
                 convert_stored_pulse_in_storage('hugos_parent', source_backend, destination_backend)
 
-            self.assertEquals('already_existing_data', destination_backend['hugo'])
-            self.assertEquals(1, len(destination_backend.stored_items))
+            self.assertEqual('already_existing_data', destination_backend['hugo'])
+            self.assertEqual(1, len(destination_backend.stored_items))
 
     def test_convert_stored_pulse_in_storage_dest_not_empty_no_id_overlap(self) -> None:
         with warnings.catch_warnings():
@@ -1548,7 +1548,7 @@ def test_convert_stored_pulse_in_storage_dest_not_empty_no_id_overlap(self) -> N
             destination_backend.put('ilse', 'already_existing_data')
             convert_stored_pulse_in_storage('hugos_parent', source_backend, destination_backend)
 
-            self.assertEquals('already_existing_data', destination_backend['ilse'])
+            self.assertEqual('already_existing_data', destination_backend['ilse'])
             pulse_storage = PulseStorage(destination_backend)
             deserialized = pulse_storage['hugos_parent']
             self.assertEqual(serializable, deserialized)
@@ -1607,8 +1607,8 @@ def test_convert_stored_pulses_dest_not_empty_id_overlap(self) -> None:
             with self.assertRaises(ValueError):
                 convert_pulses_in_storage(source_backend, destination_backend)
 
-            self.assertEquals('already_existing_data', destination_backend['hugo'])
-            self.assertEquals(1, len(destination_backend.stored_items))
+            self.assertEqual('already_existing_data', destination_backend['hugo'])
+            self.assertEqual(1, len(destination_backend.stored_items))
 
     def test_convert_stored_pulses_dest_not_empty_no_id_overlap(self) -> None:
         with warnings.catch_warnings():