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

Clean up compatibility code for older Sphinx versions #1054

Closed
mdickinson opened this issue Apr 29, 2020 · 0 comments · Fixed by #1216
Closed

Clean up compatibility code for older Sphinx versions #1054

mdickinson opened this issue Apr 29, 2020 · 0 comments · Fixed by #1216
Labels
component: trait-documenter Issues related to the trait-documenter Sphinx extension type: cleanup
Milestone

Comments

@mdickinson
Copy link
Member

There's some compatibility code in the trait_documenter tests for dealing with Sphinx versions older than 2.1. The primary reason for this code was that at the time, the most recent Sphinx release available from the buildsystem was 1.8.

We now have a newer version of Sphinx in the buildsystem, and this compatibility code can be removed.

Code link:

# Backwards compatibility hack: for now, we need to be compatible
# with both Sphinx < 2.1 (whose DocumenterBridge doesn't take
# a state argument) and Sphinx >= 2.3 (which warns if the state
# isn't passed). Eventually we should be able to drop support
# for Sphinx < 2.1.
kwds = {}
if sphinx.version_info >= (2, 1):
state = mock.Mock()
state.document.settings.tab_width = 8
kwds["state"] = state

@mdickinson mdickinson added this to the 6.2.0 release milestone Apr 29, 2020
@mdickinson mdickinson added the component: trait-documenter Issues related to the trait-documenter Sphinx extension label Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: trait-documenter Issues related to the trait-documenter Sphinx extension type: cleanup
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant