From 0dcd94864e4c2eb079f476faaf65c73a81bc10f4 Mon Sep 17 00:00:00 2001 From: Kamil Kozik Date: Fri, 23 Feb 2024 11:10:39 +0100 Subject: [PATCH] AT-10765 - add support for python 3.12 --- .github/workflows/codeql-analysis.yml | 8 ++++---- .github/workflows/pr_check.yml | 2 +- pyproject.toml | 1 + test-requirements.txt | 1 + tox.ini | 7 ++++--- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9884da3..0638f93 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. @@ -25,7 +25,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 # Override language selection by uncommenting this and choosing your languages # with: # languages: go, javascript, csharp, python, cpp, java @@ -33,7 +33,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -47,4 +47,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml index e4e8e14..47238ba 100644 --- a/.github/workflows/pr_check.yml +++ b/.github/workflows/pr_check.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@master - name: Set up Python ${{ matrix.python-version }} diff --git a/pyproject.toml b/pyproject.toml index 5b2809b..77f40e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] requires-python = ">=3.7.0" dependencies = ["lark>=1,<2"] diff --git a/test-requirements.txt b/test-requirements.txt index c3b9021..84bad7b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,4 @@ +-r requirements.txt # Linting tools pylint pycodestyle diff --git a/tox.ini b/tox.ini index 0d23cde..6c4f1b6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist={py37}-unit,{py38}-unit,{py39}-unit,{py310}-unit,{py311}-unit +envlist={py37}-unit,{py38}-unit,{py39}-unit,{py310}-unit,{py311}-unit,{py312}-unit skipsdist=true [gh-actions] @@ -9,10 +9,11 @@ python = 3.9: py39-unit 3.10: py310-unit 3.11: py311-unit + 3.12: py312-unit [testenv] commands = - pip install --upgrade -r requirements.txt -r test-requirements.txt . + pip install --upgrade -r test-requirements.txt . nose2 --config tox.ini --verbose coverage xml -o reports/coverage.xml --omit=hcl2/lark_parser.py @@ -22,7 +23,7 @@ whitelist_externals=rm passenv = TERRAFORM_CONFIG basepython=python3.7 commands = - pip install --upgrade -r requirements.txt -r test-requirements.txt -e . + pip install --upgrade -r test-requirements.txt -e . rm -f hcl2/lark_parser.py python bin/terraform_test {posargs}