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

attempt to import handle napoleon from sphinx #16

Closed
wants to merge 1 commit into from

Conversation

ktdreyer
Copy link

@ktdreyer ktdreyer commented Dec 5, 2016

napoleon ships in sphinx 1.4.8 and later. Try to load the newer path first, falling back to the older sphinxcontrib path in case users do not
have sphinx installed.

Fedora has retired the python-sphinxcontrib-napoleon RPM (obsoleted by the main python-sphinx RPM), so this change allows defopt to run on Fedora when using system packages.

napoleon ships in sphinx 1.4.8 and later. Try to load the newer path
first, falling back to the older sphinxcontrib path in case users do not
have sphinx installed.

Fedora has retired the python-sphinxcontrib-napoleon RPM (obsoleted by
the main python-sphinx RPM), so this change allows defopt to run on
Fedora when using system packages.
@evanunderscore
Copy link
Collaborator

I like the idea, but what can we do about the install time dependency? Presumably if you don't want to use this package you won't want to install it either. Currently sphinxcontrib-napoleon is an explicit dependency to be sure that pip install defopt is enough to give you the whole feature set. I would prefer to just depend on sphinx, but the install is massive which could be an issue for people who are only distributing a small module.

I can't think of a good way to give people the choice of which package to use while also guaranteeing things will work for a simple pip install defopt. Any ideas?

@ktdreyer
Copy link
Author

ktdreyer commented Dec 6, 2016

Yeah, I was not sure what to do for the pip install case. I like that defopt does not depend on the whole of Sphinx, and the fact that pip can pull down this small napoleon module is nice, particularly when defopt itself is so lightweight.

That said, sphinxcontrib-napoleon's future is unclear to me. I assumed it would be deprecated, but it looks like @RobRuana is still maintaining it separately in addition to maintaining it in sphinx core.

Rob, can you please set our expectations about the future of the sphinxcontrib version of napoleon? In particular, how long do you plan to keep maintaining it?

(Is there some other lightweight option we could consider in this case?)

@RobRuana
Copy link

RobRuana commented Dec 9, 2016

I plan on maintaining sphinxcontrib.napoleon in lockstep with sphinx.ext.napoleon for the foreseeable future. Keeping the two codebases in sync has been a trivial task so far.

One nice aspect of sphinxcontrib.napoleon is that it has no dependency on sphinx being installed, and I know at least several people are using it as a standalone library.

@ktdreyer
Copy link
Author

ktdreyer commented Dec 9, 2016

Thanks Rob for the information!

I've requested that Fedora put python-sphinxcontrib-napoleon back into the distro: https://bugzilla.redhat.com/1403388 . I think we can close this PR now.

@ktdreyer ktdreyer closed this Dec 9, 2016
@evanunderscore
Copy link
Collaborator

Thanks guys. If the situation changes in the future we can reopen this discussion.

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.

3 participants