-
-
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
Remove nitpick_patch_config function #38100
Merged
vbraun
merged 4 commits into
sagemath:develop
from
kwankyu:p/remove-outdated-nitpick-config
Jun 1, 2024
Merged
Remove nitpick_patch_config function #38100
vbraun
merged 4 commits into
sagemath:develop
from
kwankyu:p/remove-outdated-nitpick-config
Jun 1, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 tasks
5 tasks
Documentation preview for this PR (built with commit 6489d4c; changes) is ready! 🎉 |
I've tested a non-incremental build with Sphinx 7.3.7 and it looks good. Thanks! |
Thanks. Then let us ship this PR. |
vbraun
pushed a commit
to vbraun/sage
that referenced
this pull request
May 29, 2024
<!-- ^ 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):
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #37996.
We remove this function
from
src/sage_docbuild/conf.py
.The original purpose of the function seems to change
"env"
to"sage"
fornitpicky
config variable. But the recent Sphinx is setting""
(empty string) instead of"env"
by default. See https://github.com/sphinx-doc/sphinx/blob/48cbb43e28efe82b198137042811e0ade3599ae7/sphinx/config.py#L250C1-L250C41Hence the function is already no-op. But this old and obsolete function is the cause of sage doc does not even start to build with sphinx 7.3.7 #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
⌛ Dependencies