Skip to content
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

Run Sphinx doc generation in Python 3 #23081

Closed
Hexcles opened this issue Apr 17, 2020 · 3 comments
Closed

Run Sphinx doc generation in Python 3 #23081

Hexcles opened this issue Apr 17, 2020 · 3 comments

Comments

@Hexcles
Copy link
Member

Hexcles commented Apr 17, 2020

We use Sphinx to parse arguments from a few wpt commands and generate docs automatically. It's currently running in Python 2. This is a reminder that once we switch our primary supported version to Python 3, we should upgrade Sphinx and run it with Python 3.

@Hexcles
Copy link
Member Author

Hexcles commented Apr 17, 2020

@stephenmcgruer
Copy link
Contributor

@ziransun - can you start looking at how compatible our document generation is with Py3? (Low priority, but since the RFC is ongoing).

I believe wpt build-docs will run it, but you'll need to make sure that it's actually using py3 all the way down. Very high level list of things I think will likely need to happen:

  1. Make sure that Python3 is being used all the way down when running wpt build-docs.
  2. Update to a new Sphinx version (in docs/requirements.txt) that supports py3
  3. Figure out any problems, iterate on fixing them :)
  4. Eventually update the docker image used for this (see tools/docker/documentation/Dockerfile) to be py3 based, though this shouldn't be required for local testing.

@Hexcles may have more thoughts.

@ziransun
Copy link
Member

Thanks @stephenmcgruer! I will take a look.

ziransun added a commit to ziransun/wpt that referenced this issue Nov 19, 2020
Issue web-platform-tests#23081

This CL made the following changes:
[1] Upgrading Sphinx version to 3.3.1 to support python 3.5+
[2] Fixing bugs invoked during Py3 run.
    a) Replace reference of "index" in checklist.md with relative path for
       index.md. This is due to "more than one target found for cross-reference"
       error thrown by Sphinx referring to it. It's a known issue in
       sphinx (sphinx-doc/sphinx#2549)
    b) Fix Sphinx in third_party/pywebsocket3. A PR has been sent at
       GoogleChromeLabs/pywebsocket3#16

Note: Command to run with Python3 is: wpt --py3 build-docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants