Closed Sbte closed 1 month ago
cc @jayaddison
This seems to be a problem, yep. Thank you for the bugreport @Sbte. Although #11165 is where these changes were first prepared, I believe the first release to include them was v7.4.0 after they were (re)introduced by #12364.
This also seems to be a regression since it breaks existing functionality, so I'll add the appropriate bugtracker label. I should be able to start on a fix within the next day or two.
@Sbte I believe that pull request #12929 should resolve this - it includes some test coverage intended to demonstrate that it does, but if you have any time available to confirm that it fixes the problem that'd be much apprecated!
I encountered exactly the same problem and tested different versions of Sphinx on my project (which is using *.rst_t files as templates):
Sphinx version | Success? |
---|---|
7.3.7 | 🆗 |
7.4.0 | 👎 |
8.0.2 | 👎 |
8.1.0 from #12929 | 🆗 |
I was always using Python 3.12.5 on Ubuntu 22.04 with WSL. I hope that my contribution is helpful.
@Sbte I believe that pull request #12929 should resolve this - it includes some test coverage intended to demonstrate that it does, but if you have any time available to confirm that it fixes the problem that'd be much apprecated!
Yes, that seems to have fixed it, thanks!
Describe the bug
Most likely since #11165 (at least since 7.4.0, not before that) my apidoc template files are not found anymore. They are called
module.rst_t
andpackage.rst_t
. Renaming them tomodule.rst.jinja
andpackage.rst.jinja
fixes the issue, but this breaks compatibility with earlier sphinx versions. Moreover,.rst_t
files will only be marked as deprecated starting 31 December 2024.How to Reproduce
conf.py
:templates/module.rst_t
:index.rst
mod/mod.py
:Using this configuration, you don't see the line "The template was found!" on the index page or anywhere else. Renaming
templates/module.rst_t
totemplates/module.rst.jinja
fixes the issue, but breaks compatibility with other sphinx versions.Environment Information
Sphinx extensions
Additional context
No response