diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index af05b9f..19d7a30 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -14,6 +14,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true +env: + DEFAULT_PYTHON: '3.12' + jobs: analyze: name: Analyze @@ -27,19 +30,19 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python ${{ env.DEFAULT_PYTHON }} uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ env.DEFAULT_PYTHON }} - name: Cache pip uses: actions/cache@v4 with: path: ~/.cache/pip - key: ${{ runner.os }}-python-${{ matrix.python-version }}-codeql-${{ hashFiles('requirements*.txt') }} + key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('requirements*.txt') }} restore-keys: | - ${{ runner.os }}-python-${{ matrix.python-version }}-codeql-${{ hashFiles('requirements*.txt') }} - ${{ runner.os }}-python-${{ matrix.python-version }}-codeql- + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('requirements*.txt') }} + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql- ${{ runner.os }}-python ${{ runner.os }}- diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml index 16d8265..6c03162 100644 --- a/.github/workflows/dev-release.yml +++ b/.github/workflows/dev-release.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: env: - DEFAULT_PYTHON: '3.11' + DEFAULT_PYTHON: '3.12' concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 17c9554..f2a2e57 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: - v* env: - DEFAULT_PYTHON: '3.11' + DEFAULT_PYTHON: '3.12' jobs: release: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ebb53f7..c01eca5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true +env: + DEFAULT_PYTHON: '3.12' + jobs: tests: name: Run ${{ matrix.mark}} tests (${{ matrix.python-version }} on ${{ matrix.os }}) @@ -27,14 +30,14 @@ jobs: include: - os: macos-latest mark: important - python-version: '3.11' + python-version: '3.12' - os: windows-latest mark: important - python-version: '3.11' + python-version: '3.12' # run all the tests only on latest python version - os: ubuntu-latest mark: all - python-version: '3.11' + python-version: '3.12' steps: - name: Checkout code @@ -92,19 +95,19 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Python 3.11 + - name: Set up Python ${{ env.DEFAULT_PYTHON }} uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ env.DEFAULT_PYTHON }} - name: Cache pip uses: actions/cache@v4 with: path: ~/.cache/pip - key: ${{ runner.os }}-python-3.11-tests-${{ hashFiles('requirements*.txt') }} + key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-tests-${{ hashFiles('requirements*.txt') }} restore-keys: | - ${{ runner.os }}-python-3.11-tests-${{ hashFiles('requirements*.txt') }} - ${{ runner.os }}-python-3.11-tests- + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-tests-${{ hashFiles('requirements*.txt') }} + ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-tests- ${{ runner.os }}-python ${{ runner.os }}- diff --git a/.readthedocs.yml b/.readthedocs.yml index 95053fb..1c48963 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -3,7 +3,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: '3.11' + python: '3.12' jobs: post_checkout: - git fetch --unshallow || true diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4a5ae0f..ed8aebc 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,6 +10,12 @@ Changelog .. change:: :tags: general, feature + Test Python 3.12 compatibility + + .. change:: + :tags: general, feature + :tickets: 93 + Remove useless warning if ``tag_filter``, ``tag_formatter`` or ``branch_formatter`` is a regexp instead of function reference. .. changelog:: diff --git a/setup.py b/setup.py index 090685d..982220e 100644 --- a/setup.py +++ b/setup.py @@ -39,6 +39,7 @@ def parse_requirements(file: Path) -> list[str]: "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], diff --git a/setuptools_git_versioning.py b/setuptools_git_versioning.py index 0ae22b5..68e2187 100644 --- a/setuptools_git_versioning.py +++ b/setuptools_git_versioning.py @@ -188,7 +188,7 @@ def _read_toml(name_or_path: str | os.PathLike = "pyproject.toml", root: str | o log.log(INFO, "Trying 'pyproject.toml' ...") try: - # for Python 3.11 + # for Python 3.11+ import tomllib with file_path.open("rb") as file: