diff --git a/.github/workflows/_build.yaml b/.github/workflows/_build.yaml index 6502cc47..b528876d 100644 --- a/.github/workflows/_build.yaml +++ b/.github/workflows/_build.yaml @@ -6,7 +6,7 @@ # # Even though we run the build in a matrix to check against different platforms, due to a known # limitation of reusable workflows that do not support setting strategy property from the caller -# workflow, we only generate artifacts for ubuntu-latest and Python 3.11, which can be used to +# workflow, we only generate artifacts for ubuntu-latest and Python 3.12, which can be used to # create a release. For details see: # # https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations @@ -35,7 +35,7 @@ permissions: contents: read env: ARTIFACT_OS: ubuntu-latest # The default OS for release. - ARTIFACT_PYTHON: '3.11' # The default Python version for release. + ARTIFACT_PYTHON: '3.12' # The default Python version for release. jobs: build: @@ -51,7 +51,7 @@ jobs: # It is recommended to pin a Runner version specifically: # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners os: [ubuntu-latest, macos-latest, windows-latest] - python: ['3.10', '3.11'] + python: ['3.10', '3.11', '3.12'] steps: - name: Harden Runner diff --git a/.github/workflows/codeql-analysis.yaml b/.github/workflows/codeql-analysis.yaml index 6a6ccbc6..3a3e1792 100644 --- a/.github/workflows/codeql-analysis.yaml +++ b/.github/workflows/codeql-analysis.yaml @@ -33,7 +33,7 @@ jobs: # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # Learn more about CodeQL language support at https://git.io/codeql-language-support language: [python] - python: ['3.11'] + python: ['3.12'] steps: - name: Harden Runner diff --git a/.github/workflows/pr-conventional-commits.yaml b/.github/workflows/pr-conventional-commits.yaml index 76479108..e6840424 100644 --- a/.github/workflows/pr-conventional-commits.yaml +++ b/.github/workflows/pr-conventional-commits.yaml @@ -29,7 +29,7 @@ jobs: - name: Set up Python uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 with: - python-version: '3.11' + python-version: '3.12' # Install Commitizen without using the package's Makefile: that's much faster than # creating a venv and installing heaps of dependencies that aren't required for this job. diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6270ca06..ba723e9c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -44,7 +44,7 @@ jobs: - name: Set up Python uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 with: - python-version: '3.11' + python-version: '3.12' - name: Set up Commitizen run: | @@ -126,7 +126,7 @@ jobs: - name: Set up Python uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 with: - python-version: '3.11' + python-version: '3.12' - name: Set up Commitizen run: | @@ -250,7 +250,7 @@ jobs: # Github disallows passing environment variables as arguments to a reusable # workflow, so we have to duplicate these values here. Related discussion # here: https://github.com/actions/toolkit/issues/931 - artifact-name: artifact-ubuntu-latest-python-3.11 + artifact-name: artifact-ubuntu-latest-python-3.12 git-user-name: jenstroeger git-user-email: jenstroeger@users.noreply.github.com secrets: diff --git a/Makefile b/Makefile index 2849dd94..3e95bdd8 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ endif .PHONY: all all: check test dist docs -# Create a virtual environment, either for Python3.11 (default) or using +# Create a virtual environment, either for Python3.12 (default) or using # the Python interpreter specified in the PYTHON environment variable. Also # create an empty pip.conf file to ensure that `pip config` modifies this # venv only, unless told otherwise. For more background, see: @@ -70,8 +70,8 @@ venv: echo "Found an inactive Python virtual environment, please activate or nuke it" && exit 1; \ fi if [ -z "${PYTHON}" ]; then \ - echo "Creating virtual environment in .venv/ for python3.11"; \ - python3.11 -m venv --upgrade-deps --prompt . .venv; \ + echo "Creating virtual environment in .venv/ for python3.12"; \ + python3.12 -m venv --upgrade-deps --prompt . .venv; \ else \ echo "Creating virtual environment in .venv/ for ${PYTHON}"; \ ${PYTHON} -m venv --upgrade-deps --prompt . .venv; \ diff --git a/README.md b/README.md index 09174512..3d8745a8 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ The badges above give you an idea of what this project template provides. It’s ### Typing -The package requires a minimum of [Python 3.10](https://www.python.org/downloads/release/python-3109/) and supports [Python 3.11](https://www.python.org/downloads/release/python-3111/). All code requires comprehensive [typing](https://docs.python.org/3/library/typing.html). The [mypy](http://mypy-lang.org/) static type checker and the [flake8-pyi](https://github.com/PyCQA/flake8-pyi) plugin are invoked by git hooks and through a Github Action to enforce continuous type checks on Python source and [stub files](https://peps.python.org/pep-0484/#stub-files). Make sure to add type hints to your code or to use [stub files](https://mypy.readthedocs.io/en/stable/stubs.html) for types, to ensure that users of your package can `import` and type-check your code (see also [PEP 561](https://www.python.org/dev/peps/pep-0561/)). +The package requires a minimum of [Python 3.10](https://www.python.org/downloads/release/python-31014/), and it supports [Python 3.11](https://www.python.org/downloads/release/python-3118/) and [Python 3.12](https://www.python.org/downloads/release/python-3121/) (default). All code requires comprehensive [typing](https://docs.python.org/3/library/typing.html). The [mypy](http://mypy-lang.org/) static type checker and the [flake8-pyi](https://github.com/PyCQA/flake8-pyi) plugin are invoked by git hooks and through a Github Action to enforce continuous type checks on Python source and [stub files](https://peps.python.org/pep-0484/#stub-files). Make sure to add type hints to your code or to use [stub files](https://mypy.readthedocs.io/en/stable/stubs.html) for types, to ensure that users of your package can `import` and type-check your code (see also [PEP 561](https://www.python.org/dev/peps/pep-0561/)). ### Quality assurance @@ -111,7 +111,7 @@ PYTHON=python3.10 make venv # Same virtual environment for a different Python v or manually: ```bash -python3.11 -m venv .venv # Or use .venv311 for more than one local virtual environments. +python3.12 -m venv .venv # Or use .venv312 for more than one local virtual environments. ``` When working with this Makefile _it is important to always [activate the virtual environment](https://docs.python.org/3/library/venv.html)_ because some of the [git hooks](#git-hooks) (see below) depend on that: diff --git a/pyproject.toml b/pyproject.toml index a9f3a901..e2e1ff66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries :: Python Modules",