GeezerVison is showing github.com — Pin Sphinx plugins to compatible versions by EliahKagan · Pull Request #1803 · gitpython-developers/GitPython
Conversation
EliahKagan
commented
Jan 15, 2024
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Fixes #1802
This fixes version incompatibilities with major version 4 of Sphinx, which GitPython is still using for the time being. Some plugins that previously had depended back on Sphinx have had those dependencies removed to avoid dependency cycles, but the effect is that pip no longer is aware of or able to enforce version compatibility, and newer plugin versions than can actually run with Sphinx 4 are installed instead of older, usable versions.
This fixes the problem by pinning each of the affected Sphinx plugins' latest actually compatible versions, i.e., latest versions that do not need Sphinx 5 or higher. Two of the plugins are pinned to ranges of a few versions rather than individual versions in order to preserve compatibility with Python 3.7 without making doc/requirements.txt more complicated (but Python 3.7 could be special-cased if desired, as discussed at the end of #1802). I also took this opportunity to bump the sphinx dependency to the latest bugfix release within 4.3, which does not break compatibility. I used whitespace in same style as in test-requirements.txt.
The alternative of moving to Sphinx 5 or higher should probably be done eventually, but will require addressing a cross-reference ambiguity in type annotations for the Actor class.
For details on the bug, see:
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This fixes version incompatibilities with major version 4 of
Sphinx, which GitPython is still using for the time being. Some
plugins that previously had depended back on Sphinx have had those
dependencies removed to avoid dependency cycles, but the effect is
that `pip` no longer is aware of or able to enforce version
compatibility, and newer plugin versions than can actually run with
Sphinx 4 are installed instead of older, usable versions.
This fixes the problem by pinning each of the affected Sphinx
plugins' latest actually compatible versions, i.e., latest versions
that do not need Sphinx 5 or higher.
The alternative of moving to Sphinx 5 or higher should probably be
done eventually, but will require addressing a cross-reference
ambiguity in type annotations for the `Actor` class.
For details on the bug, see:
- gitpython-developers#1799 (comment)
- gitpython-developers#1802
This uses narrow ranges, rather than pinning single versions, for
two of the Sphinx plugins whose versions are recently pinned.
This is so that plugin versions compatible with Python 3.7 (which
GitPython still supports) can be selected.
Although 4.4.0 or greater do not seem usable for the time being due
to finding "more than one target found for cross-reference 'Actor'"
as examined in gitpython-developers#1802, bugfixes from 4.3.* patch releases are okay.
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 so much for your help with this, and for keeping GitPython afloat!
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
EliahKagan reacted with thumbs up emoji
EliahKagan
added a commit
to EliahKagan/GitPython
that referenced
this pull request
Feb 23, 2024
This configures Read the Docs builds to be more like local builds
in two ways:
- Pass "-W", as is done in a local build with "make -C doc html",
so that if there are broken references, the build fails.
- Install dependencies. This configures the Python environment, via
the python.install key, so that RTD builds install requirements.
More specifically on dependency installation, it does two things:
1. The equivalent of "pip install .", which installs the project
and its dependencies (though not any extras). This includes the
gitdb dependency, which is needed to import GitPython's git
module to populate sections in the API Reference page (gitpython-developers#1840).
2. The equivalent of "pip install -r doc/requirements.txt", which
installs the additional Sphinx-related dependencies used when
building documentation locally.
Installing Sphinx-related dependencies is useful for three reasons:
a. Least importantly, it should increase consistency between remote
(RTD) and local documentation builds.
b. It may be needed to avoid warnings that are not being fixed at
this time, while still allowing the build to succeed with the
"-W" option (see above on that change) that causes failure for
immediately addressable problems. The effect of newer versions
of Sphinx carrying a few extra hard-to-fix warnings for
GitPython is noted in gitpython-developers#1802 (and is why they are not upgraded
in gitpython-developers#1803).
c. One of the documentation build dependencies listed in
doc/requirements.txt is sphinx_rtd_theme. In 634151a (for gitpython-developers#1794)
the line specifying this theme was commented out, since it
apparently broke in the build. This may allow it to be used
again (or can be replaced with another custom theme if desired).
This also reenables the sphinx_rtd_theme theme disabled in 634151a.
Finally, this makes minor changes to .readthedocs.yml's comments
and formatting so the comments are accurate for GitPython details
and so the file is formatted in the same style as other YAML here.
Reviewers
Byron
Byron approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|