Repository: python-control/Slycot (language: python)

Issue:
Follow SPEC 0
https://scientific-python.org/specs/spec-0000/

* [ ] Drop Python 3.8 (out of the support window already)
* [ ] Drop Python 3.9 (out of support since Oct 5)
* [ ] Enable Python 3.12


Discussion / hints:

Fix patch:
diff --git a/.github/conda-env/build-env.yml b/.github/conda-env/build-env.yml
index f7597364..f747a77e 100644
--- a/.github/conda-env/build-env.yml
+++ b/.github/conda-env/build-env.yml
@@ -1,4 +1,4 @@
 name: build-env
 dependencies:
   - boa
-  - numpy !=1.23.0
+  - numpy
diff --git a/conda-recipe/conda_build_config.yaml b/conda-recipe/conda_build_config.yaml
index 26423158..6c968691 100644
--- a/conda-recipe/conda_build_config.yaml
+++ b/conda-recipe/conda_build_config.yaml
@@ -1,17 +1,14 @@
 # https://github.com/conda-forge/blas-feedstock/issues/106#issuecomment-1771747983
 # https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml
-
+# https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/migrations/python312.yaml
 
 # zip_keys Python/Numpy matrix to build for
 python:
     - 3.10.* *_cpython
-    - 3.11.* *_cpython
-# 3.12 is already building in conda-forge/slycot-feedstock, but they did not publish everything yet
-#    - 3.12.* *_cpython
+    - 3.12.* *_cpython
 numpy:
-    - 1.22
     - 1.23
-#    - 1.23
+    - 1.26
 
 zip_keys:
   -
diff --git a/pyproject.toml b/pyproject.toml
index 0aff147f..c984562f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,7 +5,7 @@ requires = [
     "wheel",
     "scikit-build>=0.15",
     "cmake>=3.14",
-    "numpy!=1.23.0"]
+    "numpy >= 1.23.1"]
 build-backend = "setuptools.build_meta"
 
 [project]
@@ -25,10 +25,9 @@ classifiers = [
     "Programming Language :: C",
     "Programming Language :: Fortran",
     "Programming Language :: Python",
-    "Programming Language :: Python :: 3.8",
-    "Programming Language :: Python :: 3.9",
     "Programming Language :: Python :: 3.10",
     "Programming Language :: Python :: 3.11",
+    "Programming Language :: Python :: 3.12",
     "Topic :: Software Development",
     "Topic :: Scientific/Engineering",
     "Operating System :: Microsoft :: Windows",
@@ -36,9 +35,9 @@ classifiers = [
     "Operating System :: Unix",
     "Operating System :: MacOS",
 ]
-requires-python = ">=3.8"
+requires-python = ">=3.10"
 dependencies = [
-    "numpy",
+    "numpy >= 1.23.1",
 ]
 dynamic = ["version"]
 


Test patch:
diff --git a/.github/conda-env/test-env.yml b/.github/conda-env/test-env.yml
index 8ab7abdd..bdc01362 100644
--- a/.github/conda-env/test-env.yml
+++ b/.github/conda-env/test-env.yml
@@ -7,4 +7,3 @@ dependencies:
   - pytest-cov
   - pytest-timeout
   - coverage
-  - coveralls >= 3.3
diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh
index 0c12237e..2ba81756 100644
--- a/.github/scripts/run-tests.sh
+++ b/.github/scripts/run-tests.sh
@@ -11,11 +11,14 @@ echo "::endgroup::"
 
 echo "::group::python-control unit tests"
 pushd ${python_control_srcdir:=./python-control}
-# test_root_locus_zoom, test_sisotool: problems with the toolbar for MPL backends, not relevant to Slycot
+# problems with the toolbar for MPL backends, not relevant to Slycot
+donttest="test_root_locus_zoom or test_sisotool"
+# don't care about deprecation warnings here
+donttest="$donttest or test_default_deprecation"
 pytest control/tests \
         --cov=$slycot_libdir \
         --cov-config=${slycot_srcdir}/.coveragerc \
-        -k "not (test_root_locus_zoom or test_sisotool)"
+        -k "not ($donttest)"
 mv .coverage ${slycot_srcdir}/.coverage.control
 popd
 echo "::endgroup::"
@@ -31,4 +34,5 @@ cd ${slycot_srcdir}
 echo "  ${slycot_libdir}" >> .coveragerc
 coverage combine
 coverage report
+coverage xml
 echo "::endgroup::"
diff --git a/.github/workflows/slycot-build-and-test.yml b/.github/workflows/slycot-build-and-test.yml
index 3f079c69..1279647c 100644
--- a/.github/workflows/slycot-build-and-test.yml
+++ b/.github/workflows/slycot-build-and-test.yml
@@ -57,24 +57,24 @@ jobs:
               - 'ubuntu'
               - 'macos'
             python:
-              - '3.8'
-              - '3.11'
+              - '3.10'
+              - '3.12'
             bla_vendor: [ 'unset' ]
             include:
               - os: 'ubuntu'
-                python: '3.11'
+                python: '3.12'
                 bla_vendor: 'Generic'
               - os: 'ubuntu'
-                python: '3.11'
+                python: '3.12'
                 bla_vendor: 'OpenBLAS'
               - os: 'macos'
-                python: '3.11'
+                python: '3.12'
                 bla_vendor: 'Apple'
               - os: 'macos'
-                python: '3.11'
+                python: '3.12'
                 bla_vendor: 'Generic'
               - os: 'macos'
-                python: '3.11'
+                python: '3.12'
                 bla_vendor: 'OpenBLAS'
 
     steps:
@@ -279,7 +279,7 @@ jobs:
       - name: Install Wheel
         run: |
           python -m pip install --upgrade pip
-          pip install matplotlib scipy pytest pytest-cov pytest-timeout coverage coveralls
+          pip install matplotlib scipy pytest pytest-cov pytest-timeout coverage
           pip install slycot-wheels/${{ matrix.packagekey }}/slycot*.whl
           pip show slycot
       - name: Slycot and python-control tests
@@ -287,13 +287,11 @@ jobs:
         env:
           JOBNAME: wheel ${{ matrix.packagekey }} ${{ matrix.blas_lib }}
       - name: report coverage
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          COVERALLS_FLAG_NAME: wheel-${{ matrix.packagekey }}-${{matrix.blas_lib}}
-          COVERALLS_PARALLEL: true
-        working-directory: slycot-src
-        # https://github.com/TheKevJames/coveralls-python/issues/252
-        run: coveralls --service=github
+        uses: coverallsapp/github-action@v2
+        with:
+          flag-name: wheel-${{ matrix.packagekey }}-${{matrix.blas_lib}}
+          parallel: true
+          file: slycot-src/coverage.xml
 
   test-conda:
     name: Test conda ${{ matrix.packagekey }}, ${{matrix.blas_lib}} BLAS lib ${{ matrix.failok }}
@@ -363,14 +361,12 @@ jobs:
         run: JOBNAME="$JOBNAME" bash slycot-src/.github/scripts/run-tests.sh
         env:
           JOBNAME: conda ${{ matrix.packagekey }} ${{ matrix.blas_lib }}
-      - name: Report coverage
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          COVERALLS_FLAG_NAME: conda-${{ matrix.packagekey }}-${{matrix.blas_lib}}
-          COVERALLS_PARALLEL: true
-        working-directory: slycot-src
-        # https://github.com/TheKevJames/coveralls-python/issues/252
-        run: coveralls --service=github
+      - name: report coverage
+        uses: coverallsapp/github-action@v2
+        with:
+          flag-name: wheel-${{ matrix.packagekey }}-${{matrix.blas_lib}}
+          parallel: true
+          file: slycot-src/coverage.xml
 
   coveralls-final:
     name: Finalize parallel coveralls
@@ -381,7 +377,6 @@ jobs:
     runs-on: ubuntu-latest
     steps:
     - name: Coveralls Finished
-      uses: coverallsapp/github-action@master
+      uses: coverallsapp/github-action@v2
       with:
-        github-token: ${{ secrets.GITHUB_TOKEN }}
         parallel-finished: true