You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably related to the issue you linked. Haven't looked at it in details, but for included files, what should be the docname then? btw the environment exposes some method to get a docname from a path iirc so it should be easily fixable.
#11510 fixed a previous failure to emit source-read for uses of the .. include:: directive. Such directives are emitted by the .. minigallery:: directive. BuildEnvironment.path2doc will then try and resolve a path similar to gen_modules/backreferences/sphinx_gallery.backreferences.identify_names.examples to a document name, which will fail as the document does not have a suffix contained within app.config.source_suffix.
Describe the bug
When including a file with the
include
directive, thedocname
argument can beNone
(since Sphinx 7.2).The docs don't mention that: https://www.sphinx-doc.org/en/master/extdev/appapi.html#event-source-read
How to Reproduce
conf.py
:index.rst
:another-file.txt
:Run this:
... and check the terminal output.
Environment Information
Sphinx extensions
none, but this behavior is relevant for extensions that want to use the
source-read
event, like in my case https://github.com/mgeier/sphinx-last-updated-by-gitAdditional context
Maybe related: #11643
Possible work-around: mgeier/sphinx-last-updated-by-git#59
The text was updated successfully, but these errors were encountered: