From bb54353565875f7bef9d46256cdcc9026fff6de6 Mon Sep 17 00:00:00 2001 From: DawoudSheraz Date: Wed, 28 Feb 2024 22:05:29 +0500 Subject: [PATCH] docs: Py312 docs build --- changelog.d/20240229_151232_dawoud.sheraz_py312.md | 1 + docs/conf.py | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 changelog.d/20240229_151232_dawoud.sheraz_py312.md diff --git a/changelog.d/20240229_151232_dawoud.sheraz_py312.md b/changelog.d/20240229_151232_dawoud.sheraz_py312.md new file mode 100644 index 0000000000..3a590cf0bc --- /dev/null +++ b/changelog.d/20240229_151232_dawoud.sheraz_py312.md @@ -0,0 +1 @@ +- [Feature] Add Python 3.12 CI and `make docs` compatibility (by @DawoudSheraz) \ No newline at end of file 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", }