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

Unclear sphinx pin in pyproject.toml #583

Closed
rossbar opened this issue Jul 9, 2022 · 4 comments · Fixed by #588
Closed

Unclear sphinx pin in pyproject.toml #583

rossbar opened this issue Jul 9, 2022 · 4 comments · Fixed by #588
Labels
bug Something isn't working

Comments

@rossbar
Copy link
Contributor

rossbar commented Jul 9, 2022

Describe the bug

The pyproject.toml contains the following pin:

"sphinx~=4.0", # Force Sphinx to be the latest version

From the comment, it is unclear whether this pin to the sphinx 4.X series is intentional or not, since "latest" == 5.X.

If the pin to sphinx 4.X is intentional, an update to the comment would be sufficient. FWIW the pin does seem to be important in that we have projects that build with sphinx 4.X but not 5.X, though I suspect the real problem is transitive dependencies (e.g. docutils). See numpy/numpy-tutorials#136.

Reproduce the bug

N/A

List your environment

N/A

@rossbar rossbar added the bug Something isn't working label Jul 9, 2022
@DominiqueMakowski
Copy link

Currently, installing sphinx-book-theme indeed downgrades the version of sphinx to 4.5 if the latest is installed (5.0.2), causing some downstream issues...

@pradyunsg
Copy link
Member

See executablebooks/meta#750.

@rossbar
Copy link
Contributor Author

rossbar commented Jul 15, 2022

@pradyunsg maybe I'm misunderstanding the checkmarks in the linked issue, but it looks like there's a discrepancy between the issue listing and the pin in sphinx-book-theme. sphinx-book-theme is pinned to ~= 4.0 on both master and the latest tagged release v0.3.2. Does this mean the checks in the linked meta-issue indicate that the checked libraries are not pinned to sphinx < 5? If so, the wording in the issue could probably use some clarification.

Note also that my original comment was about the comment in the pyproject.toml - sphinx 4 is no longer the "latest" sphinx, so if the intention is to pin sphinx-book-theme to the sphinx 4 series for now (this seems to be the case) then the comment wording should be updated. It's a very straightforward change but I just want to make sure that I'm understanding everything correctly.

@pradyunsg
Copy link
Member

pradyunsg commented Jul 15, 2022

Indeed, that checklist is for which repositories need to be migrated still. Those that are ticked are migrated and Sphinx-5 ready. The rest are not. I've updated the issuue title and text to more clearly reflect that. :)

IIUC, the blocker for this theme is indeed docutils -- since Sphinx 5 allows using docutils 18 (and 19?) which has backwards incompatible changes.

rossbar added a commit to rossbar/sphinx-book-theme that referenced this issue Jul 15, 2022
The comment here was out-of-date (sphinx 5 has been released)
which made it unclear whether the pin was intentional or an
error. From the discussion in executablebooksgh-583, it's now clear the pin
is intentional, so removing the comment for clarity.

Alternatively, the comment could be updated in a way that won't
be obsoleted by future sphinx releases - wording suggestions
welcome.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants