-
Notifications
You must be signed in to change notification settings - Fork 201
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
UPDATE: Sphinx v4.0.0 #364
Conversation
any reason not to just merge this @chrisjsewell ? |
Yeh should be fine if it’s passing tests, although it’s always good to have a quick look at https://www.sphinx-doc.org/en/master/extdev/deprecated.html and think if anything applies here |
good catch @chrisjsewell - |
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.
@choldgraf I note that both the tests (https://github.com/executablebooks/sphinx-book-theme/pull/364/checks?check_run_id=3263717973) and document's build (https://readthedocs.org/projects/sphinx-book-theme/builds/14417635/) are still not being actually run with sphinx version 4.
So obviously this isn't yet testing compatibility with v4 😬 and we need to look what is still pinning to v3
@chrisjsewell ah OK lemme take a look at the test infra, still getting the hang of tox |
Latest commit adds Sphinx 4 to the testing matrix and removes Sphinx 2. Also updates the dependencies to be alphabetical :-) edit: argh ReadTheDocs is failing because MyST-NB doesn't yet support Sphinx 4, so this PR is blocked on executablebooks/MyST-NB#338 |
@choldgraf there are test failures when I upgrade to |
@mmcky I got all the tests passing :-) could you give a quick review? |
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.
thanks for finishing this off @choldgraf looking good.
docs/conf.py
Outdated
@@ -60,7 +60,7 @@ | |||
# "linkify", | |||
# "substitution", | |||
] | |||
myst_url_schemes = ("http", "https", "mailto") | |||
myst_url_schemes = ["http", "https", "mailto"] |
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.
@choldgraf this is now the default in myst-parser
so we can remove this now.
@@ -1,7 +1,11 @@ | |||
<div class="navbar-brand-box"> | |||
<a class="navbar-brand text-wrap" href="{{ pathto('index') }}"> | |||
{% if logo %} | |||
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="logo"> | |||
<!-- `logo` is deprecated in Sphinx 4.0, so remove this when we stop supporting 3 --> |
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.
@choldgraf good find! Thanks.
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.
Oh cool it looks like there are html_logo
and latex_logo
now
https://www.sphinx-doc.org/en/master/usage/configuration.html?highlight=logo#confval-html_logo
This is something we will need to manage in jupyter-book to issue a depcration notice for logo
in jupyter-book/jupyter-book#1438
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.
we may not need to deprecate it if we are managing it under the hood though!
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.
OK -- if html
or latex
isn't specified use logo
-- I see where you are going
@chrisjsewell that is a great link. Thanks 👍 |
|
Guys, FYI it is going to be a bit more of change than this, to support docutils 0.17. It now uses a bunch of semantic HTML tags: It will break lots of current CSS, like: sphinx-book-theme/src/scss/_page.scss Line 66 in 4350696
|
@chrisjsewell I think this means that we will need to choose to only support docutils 0.17 and up, or else we're going to have to maintain a bunch of CSS that is meant for pre/post 0.17, right? For some reason our RTD builds are using docutils ~ 0.16: https://readthedocs.org/projects/sphinx-book-theme/builds/14623897/ that's why we weren't catching the CSS regressions |
ah Alternatively we could keep I don't think there is anything in the stack that uses |
I guess firstly I would have a look at what other themes are doing about this, and obviously we likely also require pydata to make updates as well, so at least for now we will likely have to pin to <0.17 You can possibly do e.g. |
for more information, see https://pre-commit.ci
Opened an issue to track |
@choldgraf just updated the branch protection rules. I learnt about this yesterday from @chrisjsewell :-) Update: Hot tip -- helps to hit save 👍 The rules were updated to include the |
As long as we are not creating version conflicts with other parts of the stack then that works for me |
I have been copying |
@mmcky anything left of this one or are you just waiting for someone to approve? |
@choldgraf just waiting on an |
ok let's ship this one so that we aren't holding everybody back from upgrading to Sphinx 4 :-) THANK YOU @mmcky 🎉 and @chrisjsewell for spotting the HTML bugs that we were going to run into w/ docutils |
This PR enables
sphinx>4
to be supported