Repository: DontShaveTheYak/cf2tf (language: python)

Issue:
deps: bump to use py3.12



Discussion / hints:

Fix patch:
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index fcf9c14..ba6acff 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -49,11 +49,12 @@ ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
 
 # Install the required python versions (this takes a bit usually) so we do lots of cacheing
 RUN --mount=type=cache,target=/home/vscode/.pyenv/cache,uid=1000 \
-    pyenv install -s 3.7.13 && \
-    pyenv install -s 3.8.13 && \
-    pyenv install -s 3.9.12 && \
-    pyenv install -s 3.10.4 && \
-    pyenv global 3.9.12 && \
+    pyenv install -s 3.8.18 && \
+    pyenv install -s 3.9.18 && \
+    pyenv install -s 3.10.13 && \
+    pyenv install -s 3.11.6 && \
+    pyenv install -s 3.12.0 && \
+    pyenv global 3.11.6 && \
     pyenv rehash
 
 # Install poetry to manage our python project
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a95b211..406e745 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -21,10 +21,10 @@ jobs:
         with:
           fetch-depth: 0
 
-      - name: Setup Python 3.9
+      - name: Setup Python 3.11
         uses: actions/setup-python@v4.7.1
         with:
-          python-version: '3.9'
+          python-version: '3.11'
           architecture: x64
 
       - name: Install dependencies
@@ -74,10 +74,10 @@ jobs:
       - name: Checkout Code
         uses: actions/checkout@v4.1.1
 
-      - name: Setup Python 3.9
+      - name: Setup Python 3.11
         uses: actions/setup-python@v4.7.1
         with:
-          python-version: '3.9'
+          python-version: '3.11'
           architecture: x64
 
       - name: Setup Poetry
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index cb0a00a..db606a7 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -9,7 +9,7 @@ repos:
       language: python
       language_version: python3
       types: ["python"]
-      args: ["-rs", "black", "-p", "3.9"]
+      args: ["-rs", "black", "-p", "3.11"]
       require_serial: true
       additional_dependencies: []
     - id: lint
@@ -18,7 +18,7 @@ repos:
       language: python
       language_version: python3
       types: ["python"]
-      args: ["-rs", "lint", "-p", "3.9"]
+      args: ["-rs", "lint", "-p", "3.11"]
       require_serial: true
       additional_dependencies: []
     - id: mypy
@@ -27,7 +27,7 @@ repos:
       language: python
       language_version: python3
       types: ["python"]
-      args: ["-rs", "mypy", "-p", "3.9"]
+      args: ["-rs", "mypy", "-p", "3.11"]
       require_serial: true
       additional_dependencies: []
     - id: tests
@@ -36,6 +36,6 @@ repos:
       language: python
       language_version: python3
       types: ["python"]
-      args: ["-rs", "tests", "-p", "3.9"]
+      args: ["-rs", "tests", "-p", "3.11"]
       require_serial: true
       additional_dependencies: []
\ No newline at end of file
diff --git a/.python-version b/.python-version
index 4dd242e..9453937 100644
--- a/.python-version
+++ b/.python-version
@@ -1,4 +1,5 @@
-3.9.12
-3.7.13
-3.8.13
-3.10.4
+3.11.6
+3.12.0
+3.10.13
+3.9.18
+3.8.18
\ No newline at end of file
diff --git a/README.md b/README.md
index e1a5336..068e492 100644
--- a/README.md
+++ b/README.md
@@ -76,7 +76,7 @@
 
 ### Prerequisites
 
-Cloudformation 2 Terraform requires python >= 3.7
+Cloudformation 2 Terraform requires python >= 3.8
 
 ### Installation
 
@@ -125,7 +125,7 @@ Contributions are what make the open-source community such an amazing place to l
 
 
 
-This project uses poetry to manage dependencies and pre-commit to run formatting, linting and tests. You will need to have both installed to your system as well as python 3.9.
+This project uses poetry to manage dependencies and pre-commit to run formatting, linting and tests. You will need to have both installed to your system as well as python 3.11.
 
 1. Fork the Project
 2. Setup the environment.
diff --git a/noxfile.py b/noxfile.py
index 333de03..441facd 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -17,7 +17,7 @@
     raise SystemExit(dedent(message)) from None
 
 
-python_versions = ["3.10", "3.9", "3.8", "3.7"]
+python_versions = ["3.12", "3.11", "3.10", "3.9", "3.8"]
 
 nox.options.sessions = (
     # "pre-commit",
diff --git a/src/cf2tf/save.py b/src/cf2tf/save.py
index e013ba2..d7a7300 100644
--- a/src/cf2tf/save.py
+++ b/src/cf2tf/save.py
@@ -8,6 +8,7 @@
 try:
     from typing import Protocol
 except ImportError:
+    # Shouldnt be needed, but just in case
     # Python 3.6 and 3.7
     from typing_extensions import Protocol  # type: ignore
 
diff --git a/src/cf2tf/terraform/hcl2/primitive.py b/src/cf2tf/terraform/hcl2/primitive.py
index 016a6aa..49a2fa5 100644
--- a/src/cf2tf/terraform/hcl2/primitive.py
+++ b/src/cf2tf/terraform/hcl2/primitive.py
@@ -4,6 +4,7 @@
 try:
     from typing import Protocol
 except ImportError:
+    # Shouldnt be needed, but just in case
     # Python 3.6 and 3.7
     from typing_extensions import Protocol  # type: ignore
 


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 70e4695..a50b58b 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -12,7 +12,7 @@ on:
 jobs:
   single:
     runs-on: ubuntu-latest
-    name: Python 3.9
+    name: Python 3.11
     steps:
       - name: Checkout Code
         uses: actions/checkout@v4.1.1
@@ -20,7 +20,7 @@ jobs:
       - name: Setup Latest Python
         uses: actions/setup-python@v4.7.1
         with:
-          python-version: 3.9
+          python-version: 3.11
           architecture: x64
 
       - name: Setup Poetry
@@ -32,10 +32,10 @@ jobs:
         run: pip install nox nox_poetry coverage[toml]
 
       - name: Run Tests
-        run: nox -s tests -p 3.9
+        run: nox -s tests -p 3.11
 
       - name: Combine Coverage reports
-        run: nox -s coverage -p 3.9
+        run: nox -s coverage -p 3.11
 
       - name: Convert Coverage
         run: coverage xml --fail-under=0
@@ -52,7 +52,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: ["3.8", "3.10"] # 3.9 is done in the job above
+        python-version: ["3.8", "3.9", "3.10", "3.12"] # 3.11 is done in the job above
     name: Python ${{ matrix.python-version }}
     steps:
       - name: Checkout Code