Repository: sandialabs/pyGSTi (language: python)

Issue:
Python Version Deprecations for 0.9.12
Python 3.12.0 came out earlier this month which put version support back on my mind. With 0.9.12 coming down the pipeline soon it would be a good opportunity to officially announce a deprecation of official support for python 3.7 with the intention of removing it from our CI testing pipeline in 0.9.13. Ideally we'd also target 0.9.13 for adding in official python 3.11 support at the same time (we already have a number of users on this version of python and have done some patches related to this so it probably wouldn't be too much of a lift).

Thoughts?




Discussion / hints:
Completely agree - let's plan to deprecate 3.7 in release 0.9.12, and then drop 3.7 and add 3.11 for release 0.9.13. I think at this point we've got many of the main bugs with 3.11, but I'm sure the tests will catch a few more.

Is there an easy way to indicate python version deprecation? Maybe @rileyjmurray knows this? In the past, I think we have just dropped and added Python version support with no warning, but we can always strive to do better. Obviously I can include the deprecation in the release notes and on the PyPi page, but that seems to have limited exposure.
With CVXPY, our policy is that we can drop support for a version of Python without warning _if_ the Python Software Foundation drops support for that version. Since the PSF dropped support for 3.7 a while back I'd say there's good cause to drop it from pyGSTi's supported Python versions.

In that case, maybe we can just accelerate our timeline and drop 3.7 as of 0.9.12. I'll experimentally turn on testing for Python 3.11 and see how bad it is - if just a few more straggling changes, we can do that this release also.

Fix patch:
diff --git a/.github/workflows/autodeploy.yml b/.github/workflows/autodeploy.yml
index 78cb9b8b0..5ad63e206 100644
--- a/.github/workflows/autodeploy.yml
+++ b/.github/workflows/autodeploy.yml
@@ -30,12 +30,12 @@ jobs:
       - uses: actions/setup-python@v2
         name: Install Python
         with:
-          python-version: '3.8'
+          python-version: '3.10'
           
       - name: Build wheels
         uses: pypa/cibuildwheel@v2.1.2
         env:
-          CIBW_BUILD: cp37-* cp38-* cp39-* cp310-*
+          CIBW_BUILD: cp38-* cp39-* cp310-* cp311-*
           CIBW_BUILD_VERBOSITY: 1
           CIBW_BEFORE_ALL_LINUX: ./.github/ci-scripts/before_install.sh
 
@@ -56,7 +56,7 @@ jobs:
       - uses: actions/setup-python@v2
         name: Install Python
         with:
-          python-version: '3.8'
+          python-version: '3.10'
 
       - name: Build sdist
         run: python setup.py sdist
diff --git a/.github/workflows/extras.yml b/.github/workflows/extras.yml
index da69b9594..a09df1a83 100644
--- a/.github/workflows/extras.yml
+++ b/.github/workflows/extras.yml
@@ -22,7 +22,7 @@ jobs:
       fail-fast: false # Finish all tests even if one fails
       matrix:
         os: [ubuntu-20.04, windows-2019, macos-11]
-        python-version: [3.7, 3.8, 3.9, '3.10']
+        python-version: [3.8, 3.9, '3.10', '3.11']
         
     steps:
     - uses: actions/checkout@v2
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 45bb8c0f6..f5361f6c8 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -23,7 +23,7 @@ jobs:
     strategy:
       matrix:
         os: [ubuntu-20.04, windows-2019, macos-11]
-        python-version: [3.7, 3.8, 3.9, '3.10']
+        python-version: [3.8, 3.9, '3.10', '3.11']
 
     steps:
     - uses: actions/checkout@v2
diff --git a/.github/workflows/manualdeploy.yml b/.github/workflows/manualdeploy.yml
index 76000607a..b54972b15 100644
--- a/.github/workflows/manualdeploy.yml
+++ b/.github/workflows/manualdeploy.yml
@@ -23,12 +23,12 @@ jobs:
       - uses: actions/setup-python@v2
         name: Install Python
         with:
-          python-version: '3.8'
+          python-version: '3.10'
           
       - name: Build wheels
         uses: pypa/cibuildwheel@v2.1.2
         env:
-          CIBW_BUILD: cp36-* cp37-* cp38-* cp39-*
+          CIBW_BUILD: cp38-* cp39-* cp310-* cp311-*
           CIBW_BUILD_VERBOSITY: 1
           CIBW_BEFORE_ALL_LINUX: ./.github/ci-scripts/before_install.sh
 
@@ -48,7 +48,7 @@ jobs:
       - uses: actions/setup-python@v2
         name: Install Python
         with:
-          python-version: '3.8'
+          python-version: '3.10'
 
       - name: Build sdist
         run: python setup.py sdist
diff --git a/.github/workflows/notebook.yml b/.github/workflows/notebook.yml
index 1622e0a65..c3b3e3204 100644
--- a/.github/workflows/notebook.yml
+++ b/.github/workflows/notebook.yml
@@ -20,7 +20,7 @@ jobs:
       fail-fast: false # Finish all tests even if one fails
       matrix:
         os: [ubuntu-20.04, windows-2019, macos-11]
-        python-version: [3.7, 3.8, 3.9, '3.10']
+        python-version: [3.8, 3.9, '3.10', '3.11']
         
     steps:
     - uses: actions/checkout@v2


Test patch:
diff --git a/.github/workflows/testdeploy.yml b/.github/workflows/testdeploy.yml
index ccdce5c3d..2926f62eb 100644
--- a/.github/workflows/testdeploy.yml
+++ b/.github/workflows/testdeploy.yml
@@ -26,7 +26,7 @@ jobs:
       - uses: actions/setup-python@v2
         name: Install Python
         with:
-          python-version: '3.8'
+          python-version: '3.10'
 
       #Now this is the default:
       #- name: Use cython-enabled pyproject.toml
@@ -37,7 +37,7 @@ jobs:
       - name: Build wheels
         uses: pypa/cibuildwheel@v2.1.2
         env:
-          CIBW_BUILD: cp36-* cp37-* cp38-* cp39-*
+          CIBW_BUILD: cp38-* cp39-* cp310-* cp311-*
           CIBW_BUILD_VERBOSITY: 1
           CIBW_BEFORE_ALL_LINUX: ./.github/ci-scripts/before_install.sh
 
@@ -56,7 +56,7 @@ jobs:
       - uses: actions/setup-python@v2
         name: Install Python
         with:
-          python-version: '3.8'
+          python-version: '3.10'
 
       - name: Build sdist
         run: python setup.py sdist