Skip to content

Building docs SyntaxError #5479

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

Closed
phaebz opened this issue Nov 9, 2013 · 6 comments
Closed

Building docs SyntaxError #5479

phaebz opened this issue Nov 9, 2013 · 6 comments
Labels
Milestone

Comments

@phaebz
Copy link
Contributor

phaebz commented Nov 9, 2013

I followed this advice but on python make.py html I get

Running Sphinx v1.2b3
Exception occurred while building, starting debugger:
Traceback (most recent call last):
  File "/usr/local/lib/python3.3/site-packages/sphinx/cmdline.py", line 245, in main
    warningiserror, tags, verbosity, parallel)
  File "/usr/local/lib/python3.3/site-packages/sphinx/application.py", line 119, in __init__
    self.setup_extension(extension)
  File "/usr/local/lib/python3.3/site-packages/sphinx/application.py", line 283, in setup_extension
    mod = __import__(extension, None, None, ['setup'])
  File "/Users/user/Optional/pandas/doc/sphinxext/numpydoc.py", line 40
    title_re = re.compile(ur'^\s*[#*=]{4,}\n[a-z0-9 -]+\n[#*=]{4,}\s*',
                                                                     ^
SyntaxError: invalid syntax
> /usr/local/lib/python3.3/site-packages/sphinx/application.py(283)setup_extension()
-> mod = __import__(extension, None, None, ['setup'])
(Pdb) 

I looked into doc/sphinxtest/numpydoc.py and noticed the u'' strings in the re.* functions. This incompatibility is not documented. ff52cbb says something about "py3 compat", but I am not sure if the "revert" refers to py3 compat or just to "docs".

@jorisvandenbossche
Copy link
Member

The codebase is made python3 compatible a time ago, but I don't know if somebody also really tried to build the docs on python 3 (see eg #5488). So there could certainly be some issues.

@cpcloud
Copy link
Member

cpcloud commented Nov 11, 2013

IIRC there are compatibility issues with the sphinx plugins, if anyone is interested in getting them to work. Probably just requires a sprinkling of pandas.compat

@jorisvandenbossche
Copy link
Member

or, replacing it with the upstream IPython version, which should already be python 3 compatible. See #5221

@metakermit
Copy link
Contributor

Me and @phaebz started working on a temporary solution, so that we can contribute to the documentation using Python3, before #5221 gets resolved. I pushed the initial work in PR #5530 .

@phaebz
Copy link
Contributor Author

phaebz commented Nov 22, 2013

@Kermit666 and I are taking the route of "sprinkling with pandas.compat" since we think this might be easier/faster than #5221 as there was no recent activity there. Correct me if I am wrong.

@phaebz
Copy link
Contributor Author

phaebz commented Jan 31, 2014

Closing this since further Python 3 compat work for building documentation will be pursued elsewhere.

@phaebz phaebz closed this as completed Jan 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants