From a9db025473a0e1a294f57636673af268cf67b50d Mon Sep 17 00:00:00 2001 From: "A. Riddell" Date: Fri, 23 Feb 2024 17:18:08 -0500 Subject: [PATCH 1/2] ci: Test under Python 3.12 --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 346710958..0ff1e2b72 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,10 +13,14 @@ jobs: include: - os: ubuntu-22.04 python-version: "3.11" + - os: ubuntu-22.04 + python-version: "3.12" - os: macos-11.0 python-version: "3.10" - os: macos-11.0 python-version: "3.11" + - os: macos-11.0 + python-version: "3.12" steps: - name: Check out repository uses: actions/checkout@v2 @@ -38,8 +42,10 @@ jobs: poetry export -f requirements.txt --without-hashes --with dev -o requirements.txt \ && pip install -r requirements.txt + # disable building docs (included in checks) under Python 3.12, sphinx dependencies do not work - name: Check code run: scripts/check + if: ${{ matrix.python-version != 3.12 }} - name: Build and Install wheel run: | From 7f801514d7ee6d97295aa71dc4bc14908f7e9374 Mon Sep 17 00:00:00 2001 From: "A. Riddell" Date: Thu, 11 Apr 2024 19:43:02 -0400 Subject: [PATCH 2/2] fix: Remove unsupported openapi spec validation The `apispec` package no longer provides validation. --- docs-requirements.txt | 2 +- httpstan/openapi.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs-requirements.txt b/docs-requirements.txt index bef1fe2d7..c535b8afd 100644 --- a/docs-requirements.txt +++ b/docs-requirements.txt @@ -15,5 +15,5 @@ jsonschema>=4.10.0,<4.18.0 # newer versions break sphinxcontrib-openapi sphinxcontrib-redoc~=1.6 # required for building OpenAPI spec -apispec[yaml,validation]~=4.0 +apispec[yaml,validation]~=6.0 marshmallow~=3.10 # needed for apidocs diff --git a/httpstan/openapi.py b/httpstan/openapi.py index 69520cdc0..ca9a3126d 100644 --- a/httpstan/openapi.py +++ b/httpstan/openapi.py @@ -55,5 +55,4 @@ def openapi_spec() -> apispec.APISpec: spec.path(path="/v1/models/{model_id}/fits/{fit_id}", view=views.handle_get_fit) spec.path(path="/v1/models/{model_id}/fits/{fit_id}", view=views.handle_delete_fit) spec.path(path="/v1/operations/{operation_id}", view=views.handle_get_operation) - apispec.utils.validate_spec(spec) return spec