Skip to content
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

Runtime verification of sphinx and jinja2 versions #381

Merged
merged 3 commits into from
Apr 13, 2022

Conversation

rossbar
Copy link
Contributor

@rossbar rossbar commented Apr 12, 2022

A possible mid-term solution to #380 - see discussion there for details.

Summary

For numpydoc to continue supporting unmaintained sphinx versions (sphinx<4), some form of check needs to be in place to prevent Jinja2>=3.1 from being used with sphinx<4. numpydoc 1.2.1 has pinned Jinja2<3.1, but this is not ideal as it prevents projects that have sphinx>4.0.2 from using the latest Jinja2. One proposed solution is to remove the install requirement and replace it with a runtime environment check which raises a more informative exception message notifying numpydoc users that they are responsible for pinning Jinja2 in their projects if they wish to keep using older sphinx.

@rossbar rossbar force-pushed the sphinx-jinja-verification branch 2 times, most recently from 172ab84 to ec4a310 Compare April 12, 2022 20:42
@rossbar rossbar force-pushed the sphinx-jinja-verification branch from ec4a310 to 9d5bb8f Compare April 12, 2022 20:46
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That approach LGTM

Copy link
Collaborator

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I'd merge but this is still marked as draft -- good to go from your end @rossbar ?

@rossbar rossbar marked this pull request as ready for review April 13, 2022 17:16
@rossbar
Copy link
Contributor Author

rossbar commented Apr 13, 2022

I only marked as draft as I wasn't sure this is what people had in mind, so I wanted to make sure there was consensus before merging.

@larsoner larsoner merged commit 4aea3d2 into numpy:main Apr 13, 2022
@larsoner
Copy link
Collaborator

Thanks @rossbar !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants