-
-
Notifications
You must be signed in to change notification settings - Fork 647
rebase sage_autodoc with sphinx-8.2.3 and update sphinx to same. #39737
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
Conversation
The patch to sae_autodoc.py is big because the file has been completely reformatted with ruff upstream. I started with sphinx upstream and readded the sage bits as necessary. |
I am not able to reproduce your "builds dies horribly". With system Python 3.12.9, and all the sphinx-related Python packages from the more or less up to date Gentoo system, the only change I needed is already reported --- a/src/sage_docbuild/ext/sage_autodoc.py
+++ b/src/sage_docbuild/ext/sage_autodoc.py
@@ -2976,7 +2976,7 @@ class PropertyDocumenter(DocstringStripSignatureMixin, # type: ignore[misc]
def autodoc_attrgetter(app: Sphinx, obj: Any, name: str, *defargs: Any) -> Any:
"""Alternative getattr() for types"""
- for typ, func in app.registry.autodoc_attrgetters.items():
+ for typ, func in app.registry.autodoc_attrgettrs.items():
if isinstance(obj, typ):
return func(obj, name, *defargs)
What Python are you on? Could it be that something needs to be updated in sage the distro? |
python 3.12.9. A couple of packages are missing to build the doc with 3.13.2, but sage builds and runs with 3.13.2 here otherwise. But it is possible there is a variation of something installed causing the issue. It would be nice to pin it down precisely but if my fix works for every case that's good enough for me. The only obvious package that comes to mind would be docutils which I have at 0.21.2. |
let's compare outputs of |
That's fun but I am not sure it is reliable considering it says you have sphinx 7.4.7. |
oops ... it's correct. I forgot to clean it up. |
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. Please set it to positive review
The CI is actually failing with errors that seem to be relevant to this PR. |
Right you are! I forgot that sphinx 8.2 has a new dependency on "roman_numeral". I hope I have time tomorrow to fix this. |
I will update the branch soon, rebased on 10.6. If someone could check the distros folder. I did what I could but repology has it under at least 4 different name and I am not sure how to deal with that in repology.txt. |
Does someone have an idea why "https://files.pythonhosted.org/packages/py3/r/roman_numerals_py-3.1.0-py3-none-any.whl" does not work? Am I making a typo I cannot see? |
OK, finally figured what is missing from that formula. |
Documentation preview for this PR (built with commit ce8f6ba; changes) is ready! 🎉 |
Needs rebase, the |
I can update it if kiwis too busy... |
Yes please. I am not sure when I will have some free time on my hands again. |
sagemathgh-40457: Sphinx 8.2.3 update this is rebased sagemath#39737 ### 📝 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#40457 Reported by: Dima Pasechnik Reviewer(s):
superseded by #40457 |
sagemathgh-40457: Sphinx 8.2.3 update this is rebased sagemath#39737 ### 📝 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#40457 Reported by: Dima Pasechnik Reviewer(s):
sagemathgh-40457: Sphinx 8.2.3 update this is rebased sagemath#39737 ### 📝 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#40457 Reported by: Dima Pasechnik Reviewer(s):
sagemathgh-40457: Sphinx 8.2.3 update this is rebased sagemath#39737 ### 📝 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#40457 Reported by: Dima Pasechnik Reviewer(s):
Sphinx 8.2.3 is available and some people want to use it from their systems.
The current sage_autodoc is in sync with sphinx 8.1.3 and is not compatible with 8.2.3.
synchronizing with sphinx 8.2.3 also means we have to define
intersphinx_resolve_self
insage_docbuild/conf.py
otherwise the builds dies horribly.Finally, synchronizing sage_autodoc with sphinx 8.2.3 is not backward compatible with sphinx 8.1.3 so we have to upgrade it as well.
This branch should be merged along with other branches updating sphinxcontrib packages. They are listed as dependency below.
📝 Checklist
⌛ Dependencies
#39686 this is a requirement for both sphinx 8.1.3 and 8.2.3
#39680 this is a sphinxcontrib package that was split from #39686 due to timing