Repository: meltano/meltano

Issue:
feature: Python 3.11 support
### Feature scope

Other

### Description

Python 3.11.0 is planned to be officially released as of 2022-10-24. We should add it to our test matrix, and build Docker images for it for each release.


Discussion:
Is there an ETA for when 3.11 support will be added? I'm also interested in `meltano/meltano` Docker images with Python 3.11.
@menzenski Funny you ask - I was actually planning to take a stab at this issue today. No ETA, but I'll post updates here.

The first release following merging Python 3.11 support into `main` would result in `meltano/meltano` Docker images with Python 3.11

Resolving patch:
diff --git a/noxfile.py b/noxfile.py
--- a/noxfile.py
+++ b/noxfile.py
@@ -20,7 +20,7 @@
 
 
 package = "meltano"
-python_versions = ["3.10", "3.9", "3.8", "3.7"]
+python_versions = ["3.11", "3.10", "3.9", "3.8", "3.7"]
 main_python_version = "3.9"
 locations = "src", "tests", "noxfile.py"
 


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -20,20 +20,24 @@ jobs:
         - { id: '02', python-version: '3.8',  os: ubuntu-latest, backend-db: sqlite }
         - { id: '03', python-version: '3.9',  os: ubuntu-latest, backend-db: sqlite }
         - { id: '04', python-version: '3.10', os: ubuntu-latest, backend-db: sqlite }
-        - { id: '05', python-version: '3.7',  os: ubuntu-latest, backend-db: postgresql }
-        - { id: '06', python-version: '3.8',  os: ubuntu-latest, backend-db: postgresql }
-        - { id: '07', python-version: '3.9',  os: ubuntu-latest, backend-db: postgresql }
-        - { id: '08', python-version: '3.10', os: ubuntu-latest, backend-db: postgresql }
-        - { id: '09', python-version: '3.7',  os: ubuntu-latest, backend-db: mssql }
-        - { id: '10', python-version: '3.8',  os: ubuntu-latest, backend-db: mssql }
-        - { id: '11', python-version: '3.9',  os: ubuntu-latest, backend-db: mssql }
-        - { id: '12', python-version: '3.10', os: ubuntu-latest, backend-db: mssql }
+        - { id: '05', python-version: '3.11', os: ubuntu-latest, backend-db: sqlite }
+        - { id: '06', python-version: '3.7',  os: ubuntu-latest, backend-db: postgresql }
+        - { id: '07', python-version: '3.8',  os: ubuntu-latest, backend-db: postgresql }
+        - { id: '08', python-version: '3.9',  os: ubuntu-latest, backend-db: postgresql }
+        - { id: '09', python-version: '3.10', os: ubuntu-latest, backend-db: postgresql }
+        - { id: '10', python-version: '3.11', os: ubuntu-latest, backend-db: postgresql }
+        - { id: '11', python-version: '3.7',  os: ubuntu-latest, backend-db: mssql }
+        - { id: '12', python-version: '3.8',  os: ubuntu-latest, backend-db: mssql }
+        - { id: '13', python-version: '3.9',  os: ubuntu-latest, backend-db: mssql }
+        - { id: '14', python-version: '3.10', os: ubuntu-latest, backend-db: mssql }
+        - { id: '15', python-version: '3.11', os: ubuntu-latest, backend-db: mssql }
         # We'd like to run Windows tests for all backend-dbs see https://github.com/meltano/meltano/issues/6281
         # Windows tests for Python 3.7 is temporarily disabled - see https://github.com/meltano/meltano/issues/6479
-        # - { id: '13', python-version: '3.7',  os: windows-2022,  backend-db: sqlite }
-        - { id: '14', python-version: '3.8',  os: windows-2022,  backend-db: sqlite }
-        - { id: '15', python-version: '3.9',  os: windows-2022,  backend-db: sqlite }
-        - { id: '16', python-version: '3.10', os: windows-2022,  backend-db: sqlite }
+        # - { id: '16', python-version: '3.7',  os: windows-2022,  backend-db: sqlite }
+        - { id: '17', python-version: '3.8',  os: windows-2022,  backend-db: sqlite }
+        - { id: '18', python-version: '3.9',  os: windows-2022,  backend-db: sqlite }
+        - { id: '19', python-version: '3.10', os: windows-2022,  backend-db: sqlite }
+        - { id: '20', python-version: '3.11', os: windows-2022,  backend-db: sqlite }
       fail-fast: false
 
     # GitHub doesn't handle matrix outputs well: https://stackoverflow.com/questions/70287603
@@ -50,10 +54,14 @@ jobs:
       pytest-results-row-10: ${{ steps.append-results.outputs.pytest-results-row-10 }}
       pytest-results-row-11: ${{ steps.append-results.outputs.pytest-results-row-11 }}
       pytest-results-row-12: ${{ steps.append-results.outputs.pytest-results-row-12 }}
-      # pytest-results-row-13: ${{ steps.append-results.outputs.pytest-results-row-13 }}
+      pytest-results-row-13: ${{ steps.append-results.outputs.pytest-results-row-13 }}
       pytest-results-row-14: ${{ steps.append-results.outputs.pytest-results-row-14 }}
       pytest-results-row-15: ${{ steps.append-results.outputs.pytest-results-row-15 }}
-      pytest-results-row-16: ${{ steps.append-results.outputs.pytest-results-row-16 }}
+      # pytest-results-row-16: ${{ steps.append-results.outputs.pytest-results-row-16 }}
+      pytest-results-row-17: ${{ steps.append-results.outputs.pytest-results-row-17 }}
+      pytest-results-row-18: ${{ steps.append-results.outputs.pytest-results-row-18 }}
+      pytest-results-row-19: ${{ steps.append-results.outputs.pytest-results-row-19 }}
+      pytest-results-row-20: ${{ steps.append-results.outputs.pytest-results-row-20 }}
 
     name: "Pytest on py${{ matrix.python-version }} (OS: ${{ matrix.os }}, DB: ${{ matrix.backend-db }})"
     runs-on: ${{ matrix.os }}
@@ -203,10 +211,14 @@ jobs:
         echo "${{ needs.tests.outputs.pytest-results-row-10 }}" >> ${GITHUB_STEP_SUMMARY}
         echo "${{ needs.tests.outputs.pytest-results-row-11 }}" >> ${GITHUB_STEP_SUMMARY}
         echo "${{ needs.tests.outputs.pytest-results-row-12 }}" >> ${GITHUB_STEP_SUMMARY}
-        # echo "${{ needs.tests.outputs.pytest-results-row-13 }}" >> ${GITHUB_STEP_SUMMARY}
+        echo "${{ needs.tests.outputs.pytest-results-row-13 }}" >> ${GITHUB_STEP_SUMMARY}
         echo "${{ needs.tests.outputs.pytest-results-row-14 }}" >> ${GITHUB_STEP_SUMMARY}
         echo "${{ needs.tests.outputs.pytest-results-row-15 }}" >> ${GITHUB_STEP_SUMMARY}
-        echo "${{ needs.tests.outputs.pytest-results-row-16 }}" >> ${GITHUB_STEP_SUMMARY}
+        # echo "${{ needs.tests.outputs.pytest-results-row-16 }}" >> ${GITHUB_STEP_SUMMARY}
+        echo "${{ needs.tests.outputs.pytest-results-row-17 }}" >> ${GITHUB_STEP_SUMMARY}
+        echo "${{ needs.tests.outputs.pytest-results-row-18 }}" >> ${GITHUB_STEP_SUMMARY}
+        echo "${{ needs.tests.outputs.pytest-results-row-19 }}" >> ${GITHUB_STEP_SUMMARY}
+        echo "${{ needs.tests.outputs.pytest-results-row-20 }}" >> ${GITHUB_STEP_SUMMARY}
         echo '' >> ${GITHUB_STEP_SUMMARY}
         echo 'Please address any tests which have errored, failed, or xpassed, and any warnings emitted.' >> ${GITHUB_STEP_SUMMARY}