From 072515b564bbb0f2777c447385ad935e0bffdc2c Mon Sep 17 00:00:00 2001 From: DawoudSheraz Date: Fri, 23 Feb 2024 11:23:59 +0500 Subject: [PATCH 1/2] build: add python 3.12 checks alongside 3.8 --- .github/workflows/test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b7940a41a8..904f82b563 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,12 +9,15 @@ on: jobs: tests: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.8', '3.12'] steps: - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: ${{ matrix.python-version }} cache: 'pip' cache-dependency-path: requirements/dev.txt - name: Upgrade pip From 1f422c8795416bc0f99741f76ff29448707960c6 Mon Sep 17 00:00:00 2001 From: DawoudSheraz Date: Wed, 28 Feb 2024 22:05:29 +0500 Subject: [PATCH 2/2] docs: Py312 docs build --- docs/conf.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 48d0516fe2..f73d34cd6f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -51,6 +51,8 @@ # python 3.10 ("py:class", "NoneType"), ("py:class", "click.core.Command"), + # Python 3.12 + ("py:class", "FilterCallbackFunc"), ] # Resolve type aliases here # https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_type_aliases @@ -58,6 +60,15 @@ # python 3.10 "T": "tutor.core.hooks.actions.T", "T2": "tutor.core.hooks.filters.T2", + # # python 3.12 + "L": "tutor.core.hooks.filters.L", + "FilterCallbackFunc": "tutor.core.hooks.filters.FilterCallbackFunc", + # https://stackoverflow.com/questions/73223417/type-aliases-in-type-hints-are-not-preserved + # https://github.com/sphinx-doc/sphinx/issues/10455 + # https://github.com/sphinx-doc/sphinx/issues/10785 + # https://github.com/emdgroup/baybe/pull/67 + "Action": "tutor.core.hooks.actions.Action", + "Filter": "tutor.core.hooks.filters.Filter", }