sphinx-doc / sphinx-doc/sphinx
Improve 'RemovedInSphinx90Warning's
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
I have a large documentation written in rst which is compiled into html using sphinx. I am getting
RemovedInSphinx90Warning: Sphinx 9 will drop support for representing paths as strings. Use "pathlib.Path" or "os.fspath" instead.
warnings compiling with sphinx 8.
I tried to figure out which extension creates the issue so that I could file an issue, and this can be fixed for sphinx 9.
However, I was unable making sphinx point to the exact cause for this warning nor could I find the reason using grep on sphinx and the extensions sources.
Using the -W option to transform warnings to errors seems to have no effect on RemovedInSphinx90Warnings.
Describe the solution you'd like
sphinx should point to the exact reason for the warning so that extension developers have the early chance to fix things.
Describe alternatives you've considered
- Using
grepon sphinx and the extension sources did not help. - The warnings started to show up when updating sphinx, so there is no way to bisect the problem back the possible introduction of the problem.
- Just create a simple test project and test all extensions one by one to find the problematic one: Yes, I could do that, it's just 8 extensions in the project. It's annoying but doable. However, I think this is not a practical solution for the future as the problem will come up over and over and there should be a simple solution that helps to identify these kinds of problems simply. If there is no straight forward way to debug this, people won't care about it and won't fix it early and so I think this is an undesirable situation/solution.
Additional context
none
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the RemovedInSphinx90Warning with Sphinx 8 and the reported -W option, then trace how warnings from extensions are emitted and whether their source location is retained. The work is done when the warning identifies the exact originating extension or location and -W handles it consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100