-
Notifications
You must be signed in to change notification settings - Fork 522
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
Help wanted: Get documentation building with current Sphinx #2672
Comments
Hi, I already tried to build the docs with recents sphinx not too long ago. I spent some more time on it now and have a branch that produces a pretty flawless result. I had to fix a lot of small things, but nothing dramatic. You can take a look at my latest output of the docs here: https://wxpython-docs-test.netlify.app More DetailsI built the docs with: Python 3.12, Sphinx 8.1.3, on an arm64 Macbook
I appreciate any kind of feedback. If anyone finds errors please let me know. If you think this is useful I can push a PR. |
At first glance, it looks great! Thanks a lot for working on this. @reticulatus any comments on these updates? |
@neofelis2X many thanks for this, it's a great improvement on the current state of the documentation! I only have a few observations:
|
In Python, https://codeql.github.com/codeql-query-help/python/py-explicit-return-in-init/ https://docs.python.org/3/reference/datamodel.html#object.__init__ https://docs.astral.sh/ruff/rules/return-in-init/ I don't think the goal is to create a C++ documentation, but a Python one, and (at least for newer sphinx) can use the type annotations to enhance the docs |
In any event, the constructor return type is probably more in scope for the work @lojack5 is doing with type hints. @neofelis2X if the issues @reticulatus noted look easy to fix, that would be great, otherwise if you can make a PR with your changes, it would be much appreciated! |
Return types for |
I'm not questioning return types for All I said was that return types for constructors should not be None.
|
That's the thing, in python |
The fact that |
OK, I get what you are saying. If that is the only way to prevent the "possible constructors" from showing "-> None", then personally I would prefer it, as it is less likely to confuse people, especially new users. However, if others decide that it is more important that the |
Well without working on the sphinx generator itself (which I have no knowledge of) that's the quickest, easiest, and still technically correct way of doing it. The issue stems from the whole idea of a constructor being split across two methods in python -> |
Probably fine to leave it as-is. |
|
Pins.... hmmmm. |
Soon you'll be able to work normally, with a pyproject.toml in place. |
Currently, we are building the documentation with an old version of Sphinx, which resulting in us having to pin a bunch of Sphinx's dependencies and use an old Python.
Ideally, we'd get the documentation building with a current version of Python and Sphinx, fix the warnings/errors produced during the build, and be able to drop these pins.
See: https://github.com/wxWidgets/Phoenix/blob/master/requirements/devel.txt#L17
The text was updated successfully, but these errors were encountered: