-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 layout.html to support a sphinx version that is not three-integers #1345
Merged
benjaoming
merged 4 commits into
readthedocs:master
from
pelson:fix/sphinx-version-not-three-ints
Oct 3, 2022
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
bccb999
Update layout.html to support a sphinx version that is not three-inte…
pelson f9984d1
Apply suggestions from code review
pelson dc753f1
No reason to only have the first three elements from the sphinx version
pelson 0f1d66e
Merge branch 'master' into fix/sphinx-version-not-three-ints
benjaoming File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Note:
sphinx_version
is now just the documented value at https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.version_info.I could definitely imagine regretting only having the first 3 elements from that object in the future, and it makes no difference to the existing usage of the
sphinx_version_info
variable (the tuple comparison works the same if it is just the 3 elements, or the full thing)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.
So just to get you correctly:
sphinx_version_info
is now completely identical tosphinx_version
and is just an alias because we cannot know ifsphinx_version_info
was used by other themes or template customization, right?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.
I'm mostly certain we'll never need more than major and minor versions here, but the additional specifiers don't seem like they'll hurt anything either. This seems fine, unless we hit something with downstream usage.
This is a place I'd still avoid backwards incompatible changes, so a separate variable seems wise for now.