-
Notifications
You must be signed in to change notification settings - Fork 580
build: upgrade sphinx and change flake8 and related to only install on python >=3.8 #2288
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
Merged
aucampia
merged 1 commit into
RDFLib:main
from
aucampia:iwana-20230318T1450-flake8_diff
Mar 21, 2023
Merged
build: upgrade sphinx and change flake8 and related to only install on python >=3.8 #2288
aucampia
merged 1 commit into
RDFLib:main
from
aucampia:iwana-20230318T1450-flake8_diff
Mar 21, 2023
Conversation
This file contains hidden or 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
6a17318 to
ab41a2f
Compare
fdd5b61 to
18070cc
Compare
00bea01 to
b7c0aa2
Compare
…n python >=3.8 The main aim of this change is to get to a newer version of Sphinx. However, if just Sphinx is upgraded, poetry can't do version solving because of the version of `importlib-metadata` that flake8 needs: ```console $ poetry install Updating dependencies Resolving dependencies... (0.6s) Because no versions of flakeheaven match >3.2.1,<4.0.0 and flakeheaven (3.2.1) depends on flake8 (>=4.0.1,<5.0.0), flakeheaven (>=3.2.1,<4.0.0) requires flake8 (>=4.0.1,<5.0.0). And because no versions of flake8 match >4.0.1,<5.0.0 and flake8 (4.0.1) depends on importlib-metadata (<4.3), flakeheaven (>=3.2.1,<4.0.0) requires importlib-metadata (<4.3). And because sphinx (5.3.0) depends on importlib-metadata (>=4.8) and no versions of sphinx match >5.3.0,<6.0.0, flakeheaven (>=3.2.1,<4.0.0) is incompatible with sphinx (>=5.3.0,<6.0.0). So, because rdflib depends on both sphinx (^5.3.0) and flakeheaven (^3.2.1), version solving failed. ``` To make things work, flake8 and related is only installed for Python >=3.8, where the built-in `importlib.metadata` is used instead of the `importlib-metadata` package. This means no more flake8 on python 3.7, but it is a reasonable trade-off to get to a newer version of Sphinx, and Python 3.7 support will be dropped by 2023-06-27 anyway. Other changes: - Changed Read the Docs to use the Sphinx version from poetry instead of the custom version that was in `devtools/requirements-rtd.txt`. - Added `typing-extensions` to the poetry `docs` dependency group as it is needed for docs to build correctly. - Changed the tox `docs` environment to be closer to the Read the Docs environment. Closes <RDFLib#2272>.
b7c0aa2 to
1624b72
Compare
Member
Author
|
Planning to merge this by 2023-03-21. |
ghost
approved these changes
Mar 21, 2023
ghost
left a comment
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.
lgtm 👍
Member
Author
|
Thanks for the review @gjhiggins |
This was referenced Jul 6, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ready to merge
The PR will be merged soon if no further feedback is provided.
review wanted
This indicates that the PR is ready for review
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.
Summary of changes
The main aim of this change is to get to a newer version of Sphinx.
However, if just Sphinx is upgraded, poetry can't do version solving because of
the version of
importlib-metadatathat flake8 needs:To make things work, flake8 and related is only installed for Python >=3.8,
where the built-in
importlib.metadatais used instead of theimportlib-metadatapackage.This means no more flake8 on python 3.7, but it is a reasonable trade-off to get
to a newer version of Sphinx, and Python 3.7 support will be dropped by
2023-06-27 anyway.
Other changes:
custom version that was in
devtools/requirements-rtd.txt.typing-extensionsto the poetrydocsdependency group as it isneeded for docs to build correctly.
docsenvironment to be closer to the Read the Docsenvironment.
Closes #2272.
Checklist
the same change.
so maintainers can fix minor issues and keep your PR up to date.