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

Sphinx 7.0.0 is incompatible due to usage of style key. #8230

Closed
misl6 opened this issue May 3, 2023 · 9 comments · Fixed by #8709
Closed

Sphinx 7.0.0 is incompatible due to usage of style key. #8230

misl6 opened this issue May 3, 2023 · 9 comments · Fixed by #8709
Labels
easy Should be easy to fix Priority: Medium Should be fixed for long-term health of project
Milestone

Comments

@misl6
Copy link
Member

misl6 commented May 3, 2023

Software Versions

  • Python: *
  • OS: *
  • Kivy: master
  • Kivy installation method: source

Describe the bug
We needed to pin Sphinx ~=6.2.1 since we're incompatible with Sphinx 7.0.0.
This is due to usage of style key which has been removed.

Theme error:
/home/runner/work/kivy/kivy/kivy/__init__.py
An error happened in rendering the page api-index.
Reason: UndefinedError("'style' is undefined")
Auto-generation finished

The issue tracker is a tool to address bugs only (search known bugs: https://git.io/vM1iE).
Please use the #support Discord channel at https://chat.kivy.org/ or Stack Overflow for
support questions, more information at https://git.io/vM1yQ.

Expected behavior
Docs built successfully

To Reproduce
Build docs with a sphinx version >=7.0.0

Code and Logs and screenshots

Additional context

@misl6 misl6 added this to the 2.3.0 milestone May 3, 2023
@misl6 misl6 added easy Should be easy to fix Priority: Medium Should be fixed for long-term health of project labels May 3, 2023
@jhonatancaetano
Copy link

Hey!
I'm new around here. I would like to work on this task.

@misl6
Copy link
Member Author

misl6 commented May 21, 2023

Hi @jhonatancaetano !

I've assigned the issue to you 😀

@jhonatancaetano
Copy link

This issue occurs due to incompatibility between Kivy and Sphinx 7.0.0 or higher. To resolve this issue, I follow these steps:

  1. Checked the Sphinx version:
    I checked if the Sphinx version installed in my environment was 7.0.0 or higher. If that were the case, you would need to downgrade to a previous Kivy-compatible version.

  2. I uninstalled the current Sphinx:
    I used the pip uninstall sphinx command to uninstall the current version of Sphinx.

  3. Install a compatible version of Sphinx:
    I have installed a compatible version of Sphinx that is supported by Kivy. Using the command pip install -Iv sphinx==6.2.1 to specifically install the 6.2.1 version of Sphinx.

  4. Rebuild the documents:
    After installing the correct version of Sphinx, I tried to rebuild the Kivy docs using the command python -m sphinx <path_to_your_project>/docs <path_to_your_project>/docs/_build.

I tried to solve this problem in this way.

@jhonatancaetano
Copy link

When I went to follow these steps, it already shows Sphinx in version 6.2.1.
Kivy - Sphinx

@misl6
Copy link
Member Author

misl6 commented May 26, 2023

Hi @jhonatancaetano !

Yeah, sphinx>=7.0.0 is incompatible with Kivy ATM, what we should do in a related PR is to fix how we interact with sphinx, in order to support a more recent version.

This PR, in sphinx, which have removed support for the style key, also suggest a migration path 😀: sphinx-doc/sphinx#11381

CheckmkCI pushed a commit to Checkmk/checkmk that referenced this issue Jun 22, 2023
Also pinning the sphinx version == 6.2.1 due to
kivy/kivy#8230

Change-Id: I8b7377f68b525ee03f468616c59ada10626e853f
facebook-github-bot pushed a commit to pytorch/torchsnapshot that referenced this issue Aug 2, 2023
Summary:
Pull Request resolved: #146

Attempt to fix build docs CI - https://github.com/pytorch/torchsnapshot/actions/runs/5615285226/job/15215241587

From kivy/kivy#8230 pinning the sphinx version should fix this

Reviewed By: ananthsub

Differential Revision: D47994909

fbshipit-source-id: 9ad63a218f81220033b6a1851d917433c9817f7f
tomsch420 added a commit to joint-probability-trees/jpt-dev that referenced this issue Sep 26, 2023
@Julian-O
Copy link
Contributor

Hi @jhonatancaetano. Are you still working on this? Do you mind giving a status report here? Thanks.

@jhonatancaetano jhonatancaetano removed their assignment Oct 29, 2023
@misl6
Copy link
Member Author

misl6 commented Dec 17, 2023

Moving to milestone 3.0.0, who was in charge of this issue changed his mind, so the issue is still looking for a parent.

@misl6 misl6 modified the milestones: 2.3.0, 3.0.0 Dec 17, 2023
@kbaikov
Copy link
Contributor

kbaikov commented Mar 4, 2024

The error is still reproducible with sphinx 7++

But can someone point me to this style attribute?
I can't see it in *.rst files. Is it in some CSS? in html template? in sphinx_rtd_theme ?
A friendly point out would be appreciated.

@doulikecookiedough
Copy link

doulikecookiedough commented Apr 11, 2024

Custom themes in sphinx contain a layout.html document that the docs are based on when they are rendered (ex. via make html). The style key is deprecated since 7.0.0, so you must use the new styles key to link to your static docs. You will likely need to update the base template (ex. layout.html) with the new syntax. Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy Should be easy to fix Priority: Medium Should be fixed for long-term health of project
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants