Skip to content

Fix traitsdoc setup and compliance with py3#341

Merged
prabhuramachandran merged 6 commits into
masterfrom
fix-sphinx-traitsdoc-py3
Apr 20, 2016
Merged

Fix traitsdoc setup and compliance with py3#341
prabhuramachandran merged 6 commits into
masterfrom
fix-sphinx-traitsdoc-py3

Conversation

@kitchoi
Copy link
Copy Markdown
Contributor

@kitchoi kitchoi commented Apr 11, 2016

Traits properties should show in the API documentation with this PR. And doc build should work on Python3.

Although previously changes in #293 led to successful doc build, it in fact did not setup sphinx to use traitsdoc.get_doc_object and traitsdoc.SphinxTraitsDoc (my fault!). This PR fixes this problem.

Partial fix is made to compiler_unparse according changes in the API of ast; enough for the current doc build. In the future we may consider using customised comment syntax for documenting traits (e.g. https://github.com/enthought/trait-documenter) instead of printing the code for the traits definition, therefore removing the need for unparsing AST back to code.

Tested on OS X + Python3 + Sphinx 1.4, and Ubuntu + Python2.7 + Sphinx1.3.5

@itziakos : does this fix #228 too?

@prabhuramachandran
Copy link
Copy Markdown
Member

Thanks, this is awesome! Merging.

@prabhuramachandran prabhuramachandran merged commit 453f844 into master Apr 20, 2016
@prabhuramachandran prabhuramachandran deleted the fix-sphinx-traitsdoc-py3 branch April 20, 2016 12:32
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.

The python setup.py build_docs command does not build on windows with sphinx 1.2.3

2 participants