X Tutup
Skip to content

Commit 8d97906

Browse files
committed
Don't support building documentation on Python 3.8
This discontinues supporting building documentation on Python 3.8. It does not affect installing or running GitPython on Python 3.8 (except when the `doc` extra is used, but this is only used for building documentation). The reason is that it is no longer possible to use the same version of Sphinx on Python 3.8 as on the most recent supported versions of Python, because Python 3.14 no longer has `ast.Str` (using `str.Constant` for string literals instead), which causes the oldest version of `sphinx` that runs on Python 3.14 to be `sphinx` 7.2.0, while the newest version that is installable on Python 3.8 is `sphinx` 7.1.2. The immediately preceding commit changes the requirements for the `doc` extra to specify a newer `sphinx` version for Python 3.9 and later. This can't be done on Python 3.8. Because there can be subtle differences in documentation generated with different `sphinx` versions, and because Python 3.8 has been end-of-life for some time, it is not really worth carrying conditional dependencies for the `sphinx` version in `doc/requirements.txt`. Note that, while it is probably not a very good idea to use GitPython (or anything) on Python 3.8 since it is end-of-life, this change does not stop supporting installing GitPython on that or any other version it has been supporting. Installing and using GitPython remains supported all the way back to Python 3.7 at this time. This only affects the `doc` extra and its requirements. This change is analogous to the change made in #1956, which followed up on the change in #1964 in the same way this change follows up on the change in the immediately preceding commit.
1 parent d1ca2af commit 8d97906

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ jobs:
3030
- os-type: ubuntu
3131
python-version: "3.7"
3232
os-ver: "22.04"
33+
- build-docs: true # We ensure documentation builds, except on very old interpreters.
34+
- python-version: "3.7"
35+
build-docs: false
36+
- python-version: "3.8"
37+
build-docs: false
3338
- experimental: false
3439

3540
fail-fast: false
@@ -110,7 +115,7 @@ jobs:
110115
continue-on-error: false
111116

112117
- name: Documentation
113-
if: matrix.python-version != '3.7'
118+
if: matrix.build-docs
114119
run: |
115120
pip install '.[doc]'
116121
make -C doc html

doc/requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
sphinx >= 7.4.7, < 8 ; python_version >= "3.9"
2-
sphinx >= 7.1.2, < 7.2 ; python_version < "3.9"
1+
sphinx >= 7.4.7, < 8
32
sphinx_rtd_theme
43
sphinx-autodoc-typehints

0 commit comments

Comments
 (0)
X Tutup