diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 00aa1ed986..a5d4a838e8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.12'] + python-version: ['3.10', '3.14'] steps: - uses: actions/checkout@v3 - name: Set up Python diff --git a/changelog.d/20260413_python_version_upgrade.md b/changelog.d/20260413_python_version_upgrade.md new file mode 100644 index 0000000000..3c49bb16ae --- /dev/null +++ b/changelog.d/20260413_python_version_upgrade.md @@ -0,0 +1 @@ +- [Improvement] Drop Python 3.9 (end of life) support and add Python 3.13 and 3.14 support. The CI test matrix now covers Python 3.10 and 3.14. Fix docs build for Python 3.14 by explicitly setting `__module__` on `TypeVar`/`ParamSpec` objects; in Python 3.14 `typing_extensions` re-exports the stdlib versions, causing their `__module__` to default to `"typing"` and breaking Sphinx cross-references. (by @ali-abbass) diff --git a/pyproject.toml b/pyproject.toml index 52a14e1732..207b975ad6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,17 +9,18 @@ authors = [ ] description = "The Docker-based Open edX distribution designed for peace of mind" readme = {file = "README.rst", content-type = "text/x-rst"} -requires-python = ">= 3.9" +requires-python = ">= 3.10" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] # these fields will be set by hatch_build.py dynamic = ["version", "dependencies", "optional-dependencies"] diff --git a/tutor/core/hooks/actions.py b/tutor/core/hooks/actions.py index e081244c1d..6e24af47c1 100644 --- a/tutor/core/hooks/actions.py +++ b/tutor/core/hooks/actions.py @@ -14,6 +14,7 @@ #: Action generic signature. T = ParamSpec("T") +T.__module__ = __name__ ActionCallbackFunc = t.Callable[T, None] diff --git a/tutor/core/hooks/filters.py b/tutor/core/hooks/filters.py index ef42325dbd..676bc5e08f 100644 --- a/tutor/core/hooks/filters.py +++ b/tutor/core/hooks/filters.py @@ -13,10 +13,13 @@ #: Filter generic return value, which is also the type of the first callback argument. T1 = t.TypeVar("T1") +T1.__module__ = __name__ #: Filter generic signature for all arguments after the first one. T2 = ParamSpec("T2") +T2.__module__ = __name__ #: Specialized typevar for list elements L = t.TypeVar("L") +L.__module__ = __name__ FilterCallbackFunc = t.Callable[Concatenate[T1, T2], T1]