From 8fc9b84d3faaeca27d8d98d2fe68b6c4e5a093e5 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 7 Oct 2024 16:06:24 +0300 Subject: [PATCH 1/8] Bump GitHub Actions --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/python-package.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index dfd49c9..676e681 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,7 +39,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index de79e4c..4701bca 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -19,9 +19,9 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies From 4a311dc00db8c9295212c9c6b9d06921defbf1b9 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 7 Oct 2024 16:07:47 +0300 Subject: [PATCH 2/8] Add support for Python 3.12 --- .github/workflows/python-package.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 4701bca..1fbcb5d 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -12,9 +12,10 @@ on: jobs: pytest: strategy: + fail-fast: false matrix: platform: [ ubuntu-latest, macos-latest, windows-latest ] - 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" ] runs-on: ${{ matrix.platform }} @@ -24,6 +25,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Install dependencies run: | python -m pip install --upgrade pip From c80f98e95a763d6657a34c799949fc159e11c12e Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:41:17 +0300 Subject: [PATCH 3/8] Install setuptools for pkg_resources on 3.12+ --- .github/workflows/python-package.yml | 3 +-- setup.py | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 1fbcb5d..6aa0f3a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -29,8 +29,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install 'PyTest' - python -m pip install -e . + python -m pip install -e .[dev] - name: Test with pytest run: | pytest tests/ diff --git a/setup.py b/setup.py index 860b705..5c8cd90 100755 --- a/setup.py +++ b/setup.py @@ -192,6 +192,7 @@ def function_three(): 'sphinx < 2', # jinja2 3.0.3 was the last version to have contextfunction that sphinx 1.x needs 'jinja2~=3.0.3', + 'setuptools; python_version>="3.12"', ] }, python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', From 86c7ba2ef560a6c10345341941ecb0bd952bab1c Mon Sep 17 00:00:00 2001 From: Laurent LAPORTE Date: Thu, 14 Nov 2024 14:08:58 +0100 Subject: [PATCH 4/8] build: add missing `setuptools` dependency in `tox.ini` --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 52f9290..864bb65 100644 --- a/tox.ini +++ b/tox.ini @@ -26,6 +26,7 @@ deps = wrapt1.13: wrapt ~= 1.13.0 wrapt1.14: wrapt ~= 1.14.0 coverage + setuptools; python_version>="3.12" [testenv:docs] basepython = python From ecd3695777e1f992b33150f70953ea1c19e350aa Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:04:36 +0200 Subject: [PATCH 5/8] Remove allow-prereleases as only full releases are tested --- .github/workflows/python-package.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 6aa0f3a..a04c1da 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -25,7 +25,6 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - allow-prereleases: true - name: Install dependencies run: | python -m pip install --upgrade pip From c7140d3847b4a240d7d4272bcb41f9bd52cc4034 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:07:53 +0200 Subject: [PATCH 6/8] Only install pytest --- .github/workflows/python-package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index a04c1da..95ed828 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -28,7 +28,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install -e .[dev] + python -m pip install pytest + python -m pip install -e . - name: Test with pytest run: | pytest tests/ From 65aa0feedeac062b8457c8374672822448384da6 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:14:22 +0200 Subject: [PATCH 7/8] Explicitly install setuptools, needed for pkg_resources --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 95ed828..697c7e3 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -28,7 +28,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install pytest + python -m pip install pytest setuptools python -m pip install -e . - name: Test with pytest run: | From d87ab558fdd97d3535d5cd4c4e2e1318cee908d9 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:15:58 +0200 Subject: [PATCH 8/8] Don't test EOL Python 3.7 on macOS --- .github/workflows/python-package.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 697c7e3..64fb3a7 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,6 +16,9 @@ jobs: matrix: platform: [ ubuntu-latest, macos-latest, windows-latest ] python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ] + exclude: + - platform: macos-latest + python-version: "3.7" runs-on: ${{ matrix.platform }}