-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
sage doc does not even start to build with sphinx 7.3.7 #37996
Comments
Sphinx 7.3 doesn't like the two lines at https://github.com/sagemath/sage/blob/develop/src/sage_docbuild/conf.py#L840-L841. They conflict with a workaround added in sphinx-doc/sphinx@0c06a50. The values of
(I suppose an empty tuple for the last one means "don't validate this type"?) cc @kwankyu. |
Thanks for digging, I created a report so I would not forget to do it later :) |
If I comment the
|
Should we set an upper bound sphinx < 7.3 until this is resolved? |
I think that's one case where setting an upper limit will not be facing too much opposition. I would hope. |
Removing |
@kwankyu Interesting, that's not what I'm seeing here. I'm still using
After that, each of the subdirectories inside |
Sorry. My sage install was actually using Sphinx 7.2.6. So it didn't complain about the code
in I set #38100 to "needs work" as it is not yet ready for sphinx 7.3.7. |
By the way, |
I just commented out the |
Yes, I am experimenting along the line similar to yours. Let's see. |
#38100 works well with sphinx 7.3.7 and is ready for review. |
<!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> Fixes sagemath#37996. We remove this function ```python def nitpick_patch_config(app): """ Patch the default config for nitpicky [...] ensure that nitpicky is not considered as a Sphinx environment variable but rather as a Sage environment variable. As a consequence, changing it doesn't force the recompilation of the entire documentation. """ app.config.values['nitpicky'] = (False, 'sage') app.config.values['nitpick_ignore'] = ([], 'sage') ``` from `src/sage_docbuild/conf.py`. The original purpose of the function seems to change `"env"` to `"sage"` for `nitpicky` config variable. But the recent Sphinx is setting `""` (empty string) instead of `"env"` by default. See https://github.com/sphinx-doc/sphinx/blob/48cbb43e28efe82b198137042811e0 ade3599ae7/sphinx/config.py#L250C1-L250C41 - Hence the function is already no-op. But this old and obsolete function is the cause of sagemath#37996. Hence we simply remove it. - To prepare for Sphinx 7.3.7, we also remove some code which seems to have become obsolete when `sage -clone` was removed long time ago. - Made some docstring up-to-date, to test incremental doc build. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#38100 Reported by: Kwankyu Lee Reviewer(s):
<!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> Fixes sagemath#37996. We remove this function ```python def nitpick_patch_config(app): """ Patch the default config for nitpicky [...] ensure that nitpicky is not considered as a Sphinx environment variable but rather as a Sage environment variable. As a consequence, changing it doesn't force the recompilation of the entire documentation. """ app.config.values['nitpicky'] = (False, 'sage') app.config.values['nitpick_ignore'] = ([], 'sage') ``` from `src/sage_docbuild/conf.py`. The original purpose of the function seems to change `"env"` to `"sage"` for `nitpicky` config variable. But the recent Sphinx is setting `""` (empty string) instead of `"env"` by default. See https://github.com/sphinx-doc/sphinx/blob/48cbb43e28efe82b198137042811e0 ade3599ae7/sphinx/config.py#L250C1-L250C41 - Hence the function is already no-op. But this old and obsolete function is the cause of sagemath#37996. Hence we simply remove it. - To prepare for Sphinx 7.3.7, we also remove some code which seems to have become obsolete when `sage -clone` was removed long time ago. - Made some docstring up-to-date, to test incremental doc build. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#38100 Reported by: Kwankyu Lee Reviewer(s):
Steps To Reproduce
Found this while trying to build sage-doc in sage-on-gentoo with python 3.12 and sphinx 7.3.7/docutils-0.21.2 (downgrading docutils to a previous working version did not help)
Expected Behavior
It builds successfully
Actual Behavior
Additional Information
No response
Environment
Checklist
The text was updated successfully, but these errors were encountered: