-
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
Support Sphinx post-releases #1344
Conversation
Slices to ignore version info after minor release as this can be variable length or non-int.
From https://github.com/sphinx-doc/sphinx/issues
I guess that is |
from
so I guess it is sphinx_version_tuple. |
But that was only added in sphinx-doc/sphinx@426fdca, which was only added in 4.2 (2021-09-12), so we should definitely still parse the string for a few more years - at least, I would do more. |
Yes, A |
If you want to keep the logic in pure Jinja, you could gate the split/map operation on Sphinx versions prior to 4.2, and use the tuple from 4.2 onwards, I believe. A |
I raised this PR as an option to resolve the short-term issue, this is no longer required as Sphinx released 5.2.1. Personal opinion is we shouldn't be checking the version to determine how to check the version. Agree with @AA-Turner on his first comment, and since |
FWIW I implemented a fix in #1345. |
Fixes #1343, the way this string is being separated was not safe for Sphinx's pypi pre-release/post-release versions.
This includes current release
5.2.0.post0
, but also applies to previous pypi beta releases such as5.0.0b1
As the
_ver_bugfix
is not being used within templates, we can slice to only includemajor
andminor
components.This avoids issues from the
patch
component being non-integer as well thelen(sphinx_version.split('.'))
being > 3.