From 0bb8bd3e9efb92d2f45bb6697391008cc1578514 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 6 Feb 2024 23:03:31 +0100 Subject: [PATCH 1/4] Maintenance: Add support for Python 3.12 --- .github/workflows/main.yml | 2 +- CHANGES.md | 2 +- pyproject.toml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6dcc37c..e7f993f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: fail-fast: true matrix: os: ["ubuntu-latest", "macos-latest", "windows-latest"] - python-version: ["3.8", "3.11"] + python-version: ["3.8", "3.12"] env: OS: ${{ matrix.os }} diff --git a/CHANGES.md b/CHANGES.md index 4a3dc2b..2218420 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,7 @@ ## in progress - +- Maintenance: Add support for macOS, Windows, and Python 3.12 ## 2023-08-23 v0.1.0 - Initial thing, using `arbitrary-dateparser` and `DateRangeParser` packages diff --git a/pyproject.toml b/pyproject.toml index 00ac69c..073113f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,6 +52,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Communications", "Topic :: Education", "Topic :: Home Automation", From 68080123c717c3b5084e9228e2204be0a646be36 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 6 Feb 2024 23:35:59 +0100 Subject: [PATCH 2/4] CI: Use `pip --no-build-isolation` to resolve pendulum-2.x / Py312 woes --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e7f993f..afdb84e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,7 +56,10 @@ jobs: pip install "setuptools>=64" --upgrade # Install package in editable mode. - pip install --use-pep517 --prefer-binary --editable=.[develop,docs,test] + # FIXME: Workaround for installing pendulum 2.x on Python 3.12. + # https://github.com/sdispater/pendulum/issues/454#issuecomment-654096754 + pip install poetry + pip install --use-pep517 --prefer-binary --no-build-isolation --editable=.[develop,docs,test] - name: Run linter and software tests run: | From 1e9bada0280fa5cc004f7cf4fc261708fd46552e Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 6 Feb 2024 23:55:31 +0100 Subject: [PATCH 3/4] CI: Install `wheel` package to aid Python 3.12 setup --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index afdb84e..551f4fe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,6 +55,9 @@ jobs: # https://github.com/pypa/setuptools/blob/main/CHANGES.rst#v6400 pip install "setuptools>=64" --upgrade + # Install `wheel` package. + pip install wheel + # Install package in editable mode. # FIXME: Workaround for installing pendulum 2.x on Python 3.12. # https://github.com/sdispater/pendulum/issues/454#issuecomment-654096754 From e84e7a8d2557f83f1a09b8c6959294ac3cd8b2dc Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 6 Feb 2024 23:56:32 +0100 Subject: [PATCH 4/4] Dependencies: Do not install `build` package through `develop` extra --- .github/workflows/main.yml | 2 +- pyproject.toml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 551f4fe..abc22dc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,7 +62,7 @@ jobs: # FIXME: Workaround for installing pendulum 2.x on Python 3.12. # https://github.com/sdispater/pendulum/issues/454#issuecomment-654096754 pip install poetry - pip install --use-pep517 --prefer-binary --no-build-isolation --editable=.[develop,docs,test] + pip install --use-pep517 --prefer-binary --no-build-isolation --editable=.[develop,test] - name: Run linter and software tests run: | diff --git a/pyproject.toml b/pyproject.toml index 073113f..aac648a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,6 @@ dynamic = [ [project.optional-dependencies] develop = [ "black<25", - "build<2", "mypy==1.8.0", "poethepoet<1", "pyproject-fmt<1.8",