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

Fix sphinx extension for newer versions of sphinx #98

Merged
merged 9 commits into from
Jul 26, 2024
Merged

Conversation

hagenw
Copy link
Member

@hagenw hagenw commented Jul 23, 2024

Closes #99

sphinx.application.Sphinx.srcdir does no longer return a string, but an _StrPat object in newer versions of sphinx.

This adds tests for newer versions of sphinx, by avoiding using our sphinx-audeering-theme in the tests as it only work with sphinx<6.0.

@hagenw hagenw marked this pull request as draft July 26, 2024 07:08
@hagenw hagenw marked this pull request as ready for review July 26, 2024 07:27
Copy link
Member

@ChristianGeng ChristianGeng left a comment

Choose a reason for hiding this comment

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

This makes the packages's sphinx app future-proof by fixing a typing issue.
The tests run against the alabaster theme as sphinx-audeering-theme cannot support more recent sphinx-versions.

With limited access to internet I cannot test locally too well for now.
But:

I can see that all actions for the sphinx matrix are passsing:

sphinx: [ 'sphinx==5.3.0', 'sphinx==6.2.1', 'sphinx==7.*' ]

I also see that the replace methods in sphinx.__init__ should be safe as it only has an effect if the input type is not a string.

I therefore believe that this is safe to approve.

@hagenw hagenw merged commit 70b98e0 into main Jul 26, 2024
10 checks passed
@hagenw hagenw deleted the fix-newer-sphinx branch July 26, 2024 08:42
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.

Sphinx extension fails with recent versions of sphinx
2 participants