-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compatibility with Sphinx 8 #199
Fix compatibility with Sphinx 8 #199
Conversation
Thanks for flagging the issue, @WarrenWeckesser! This is ready for review. |
Thanks for the quick fix, @agriyakhetarpal. When I locally replaced |
Nevermind, I understand the issue now. It's that we were treating the output as a string, |
FYI: I created an issue at |
Thanks for trying this out with MyST-NB, @WarrenWeckesser! I think we should be good to go with this PR, then, @steppi – since the warning is no longer emitted here. The MyST-NB one could be suppressed if the fix there takes longer to land. |
Convert `_StrPath` to `str` instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Description
The function
_process_docstring_examples
usedapp.env.doc2path
, which now needs paths instead of strings, since Sphinx 9 will drop support for representing paths as strings, which was raising warnings for the new release of Sphinx, i.e., version 8. This usespathlib.Path()
to process the path. A few other type hints have been added to the function's arguments.Closes #197
Additional context
xref docs build failures in SciPy downstream: scipy/scipy#21323, scipy/scipy#21324