-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Describe the bug
Since Sphinx 9, a CI failure appeared in my project https://github.com/mgeier/sphinx-last-updated-by-git, see e.g. https://github.com/mgeier/sphinx-last-updated-by-git/actions/runs/20314482086/job/58354292735.
I bisected the problem down to #13681, commit f2bf37d.
I think the problem is here:
sphinx/sphinx/environment/__init__.py
Lines 616 to 617 in 038fc40
| # this will do the right thing when *filename* is absolute too | |
| filename = self.srcdir / filename |
This line has been added and it turns previously relative dependency paths into absolute paths.
How to Reproduce
Look at dependencies that have previously been relative paths, now they are absolute paths.
For a concrete example, see the instructions in #10692, just using a different source file. Namely, add this to conf.py:
def _env_updated(app, env):
print(env.dependencies['example_module.example_function'])
exit()
def setup(app):
app.connect('env-updated', _env_updated)With f2bf37d and later, this is shown:
{_StrPath('/home/[...]/test-repo-for-sphinx-last-updated-by-git/example_module.py')}
With 711eb2b and anything before that, it displays:
{_StrPath('example_module.py')}
Environment Information
-
Sphinx extensions
Additional context
No response