From 393319842106e8d15b6a84253df8ef3ea268ef78 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Mon, 18 Sep 2023 20:06:35 -0400 Subject: [PATCH] test: python 3.12 (#225) * test: add 3.12 * ci: install numpy from github * chore: remove numpy intsall from github * test: try skip checking msgspec * build: add classifier --- .github/workflows/test.yml | 6 +++++- pyproject.toml | 1 + tests/test_dataclass_utils.py | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fc960d56..1f9ec33e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,6 +51,9 @@ jobs: - platform: windows-latest python-version: "3.11" pydantic: "pydantic<2" + - platform: ubuntu-latest + python-version: "3.12-dev" + backend: "" steps: - uses: actions/checkout@v4 @@ -61,11 +64,12 @@ jobs: - uses: tlambert03/setup-qt-libs@v1.4 if: matrix.backend != '' + - name: Install ${{ matrix.backend }} + if: matrix.backend != '' run: | python -m pip install -e .[testqt] python -m pip install ${{ matrix.backend }} - if: matrix.backend != '' - name: install run: | diff --git a/pyproject.toml b/pyproject.toml index e0d09032..b37d077b 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", "Typing :: Typed", ] dynamic = ["version"] diff --git a/tests/test_dataclass_utils.py b/tests/test_dataclass_utils.py index cf2b99f4..899c6576 100644 --- a/tests/test_dataclass_utils.py +++ b/tests/test_dataclass_utils.py @@ -7,8 +7,8 @@ try: from msgspec import Struct -except ImportError: - Struct = None +except (ImportError, TypeError): # type error on python 3.12-dev + Struct = None # type: ignore [assignment,misc] try: from pydantic import __version__ as pydantic_version