From 96a0a9b325f2abb7b35850e3423fed304c48f76f Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Sat, 26 Aug 2023 10:54:39 +0200 Subject: [PATCH 1/2] CI: Don't turn DeprecationWarning into an error --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 777f9b2..201b221 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,11 +24,12 @@ jobs: python tests/update_submodules.py - name: Install Python package env: - # See https://github.com/pypa/wheel/issues/507: - PYTHONWARNINGS: error,ignore:pkg_resources is deprecated:DeprecationWarning + PYTHONWARNINGS: error,default::DeprecationWarning run: | python -m pip install . - name: Install test dependencies + env: + PYTHONWARNINGS: error,default::DeprecationWarning run: | python -m pip install -r tests/requirements.txt - name: Run pytest From 21f9a2e40a736093bbcd66db29aa4f62796d00e7 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Sat, 26 Aug 2023 11:23:55 +0200 Subject: [PATCH 2/2] Allow docname to be None in source-read event --- src/sphinx_last_updated_by_git.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sphinx_last_updated_by_git.py b/src/sphinx_last_updated_by_git.py index d4b14d7..9d20c42 100644 --- a/src/sphinx_last_updated_by_git.py +++ b/src/sphinx_last_updated_by_git.py @@ -275,6 +275,9 @@ def _builder_inited(app): def _source_read(app, docname, source): + if docname is None: + # This may happen since Sphinx 7.2.0? + return env = app.env assert docname not in env.git_last_updated env.git_last_updated[docname] = None