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

doc build fails with mpl-1.5.1 and sphinx-1.3.4 (sphinx-1.3.3 is fine) #5869

Closed
jlec opened this issue Jan 17, 2016 · 12 comments
Closed

doc build fails with mpl-1.5.1 and sphinx-1.3.4 (sphinx-1.3.3 is fine) #5869

jlec opened this issue Jan 17, 2016 · 12 comments
Assignees
Milestone

Comments

@jlec
Copy link

jlec commented Jan 17, 2016

python ./make.py --small htmlfiles with

# Sphinx version: 1.3.4
# Python version: 2.7.11 (CPython)
# Docutils version: 0.12 release
# Jinja2 version: 2.8
# Last messages:
#   reading sources... [  4%] api/index
#   reading sources... [  4%] api/index_backend_api
#   reading sources... [  4%] api/legend_api
#   reading sources... [  4%] api/lines_api
#   reading sources... [  4%] api/markers_api
#   reading sources... [  4%] api/mathtext_api
#   reading sources... [  4%] api/matplotlib_configuration_api
#   reading sources... [  5%] api/mlab_api
#   reading sources... [  5%] api/offsetbox_api
#   reading sources... [  5%] api/patches_api
# Loaded extensions:
#   sphinx.ext.graphviz (1.3.4) from /usr/lib64/python2.7/site-packages/sphinx/ext/graphviz.pyc
#   sphinxext.github (unknown version) from /var/tmp/portage/dev-python/matplotlib-1.5.1/work/matplotlib-1.5.1-python2_7/doc/sphinxext/github.py
#   sphinx.ext.autodoc (1.3.4) from /usr/lib64/python2.7/site-packages/sphinx/ext/autodoc.pyc
#   sphinx.ext.doctest (1.3.4) from /usr/lib64/python2.7/site-packages/sphinx/ext/doctest.pyc
#   matplotlib.sphinxext.mathmpl (unknown version) from /var/tmp/portage/dev-python/matplotlib-1.5.1/work/matplotlib-1.5.1-python2_7/build/build/lib/matplotlib/sphinxext/mathmpl.py
#   matplotlib.sphinxext.plot_directive (unknown version) from /var/tmp/portage/dev-python/matplotlib-1.5.1/work/matplotlib-1.5.1-python2_7/build/build/lib/matplotlib/sphinxext/plot_directive.py
#   alabaster (0.7.7) from /usr/lib64/python2.7/site-packages/alabaster/__init__.pyc
#   sphinx.ext.inheritance_diagram (1.3.4) from /usr/lib64/python2.7/site-packages/sphinx/ext/inheritance_diagram.pyc
#   matplotlib.sphinxext.only_directives (unknown version) from /var/tmp/portage/dev-python/matplotlib-1.5.1/work/matplotlib-1.5.1-python2_7/build/build/lib/matplotlib/sphinxext/only_directives.py
#   numpydoc (unknown version) from /usr/lib64/python2.7/site-packages/numpydoc/__init__.pyc
#   sphinxext.gen_rst (unknown version) from /var/tmp/portage/dev-python/matplotlib-1.5.1/work/matplotlib-1.5.1-python2_7/doc/sphinxext/gen_rst.py
#   IPython.sphinxext.ipython_console_highlighting (unknown version) from /usr/lib64/python2.7/site-packages/IPython/sphinxext/ipython_console_highlighting.pyc
#   sphinxext.gen_gallery (unknown version) from /var/tmp/portage/dev-python/matplotlib-1.5.1/work/matplotlib-1.5.1-python2_7/doc/sphinxext/gen_gallery.py
#   sphinx.ext.autosummary (1.3.4) from /usr/lib64/python2.7/site-packages/sphinx/ext/autosummary/__init__.pyc
#   IPython.sphinxext.ipython_directive (unknown version) from /usr/lib64/python2.7/site-packages/IPython/sphinxext/ipython_directive.pyc
#   sphinxext.math_symbol_table (unknown version) from /var/tmp/portage/dev-python/matplotlib-1.5.1/work/matplotlib-1.5.1-python2_7/doc/sphinxext/math_symbol_table.py
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/sphinx/cmdline.py", line 244, in main
    app.build(opts.force_all, filenames)
  File "/usr/lib64/python2.7/site-packages/sphinx/application.py", line 266, in build
    self.builder.build_update()
  File "/usr/lib64/python2.7/site-packages/sphinx/builders/__init__.py", line 251, in build_update
    'out of date' % len(to_build))
  File "/usr/lib64/python2.7/site-packages/sphinx/builders/__init__.py", line 265, in build
    self.doctreedir, self.app))
  File "/usr/lib64/python2.7/site-packages/sphinx/environment.py", line 618, in update
    self._read_serial(docnames, app)
  File "/usr/lib64/python2.7/site-packages/sphinx/environment.py", line 638, in _read_serial
    self.read_doc(docname, app)
  File "/usr/lib64/python2.7/site-packages/sphinx/environment.py", line 791, in read_doc
    pub.publish()
  File "/usr/lib64/python2.7/site-packages/docutils/core.py", line 218, in publish
    self.apply_transforms()
  File "/usr/lib64/python2.7/site-packages/docutils/core.py", line 199, in apply_transforms
    self.document.transformer.apply_transforms()
  File "/usr/lib64/python2.7/site-packages/docutils/transforms/__init__.py", line 171, in apply_transforms
    transform.apply(**kwargs)
  File "/usr/lib64/python2.7/site-packages/sphinx/transforms.py", line 182, in apply
    apply_source_workaround(n)
  File "/usr/lib64/python2.7/site-packages/sphinx/util/nodes.py", line 53, in apply_source_workaround
    '\s*:\s*%s' % classifier.astext(), '', node.rawsource)
  File "/usr/lib64/python2.7/re.py", line 155, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "/usr/lib64/python2.7/re.py", line 251, in _compile
    raise error, v # invalid expression
error: unbalanced parenthesis
@jlec
Copy link
Author

jlec commented Jan 17, 2016

This is mpl-1.4.3

# Sphinx version: 1.3.4
# Python version: 3.5.1 (CPython)
# Docutils version: 0.12 release
# Jinja2 version: 2.8
# Last messages:
#   reading sources... [  3%] api/index
#   reading sources... [  4%] api/index_backend_api
#   reading sources... [  4%] api/legend_api
#   reading sources... [  4%] api/lines_api
#   reading sources... [  4%] api/markers_api
#   reading sources... [  4%] api/mathtext_api
#   reading sources... [  4%] api/matplotlib_configuration_api
#   reading sources... [  5%] api/mlab_api
#   reading sources... [  5%] api/offsetbox_api
#   reading sources... [  5%] api/patches_api
# Loaded extensions:
#   sphinx.ext.autodoc (1.3.4) from /usr/lib64/python3.5/site-packages/sphinx/ext/autodoc.py
#   matplotlib.sphinxext.mathmpl (unknown version) from /var/tmp/portage/dev-python/matplotlib-1.4.3/work/matplotlib-1.4.3-python3_5/build/build/lib/matplotlib/sphinxext/mathmpl.py
#   sphinx.ext.doctest (1.3.4) from /usr/lib64/python3.5/site-packages/sphinx/ext/doctest.py
#   sphinx.ext.graphviz (1.3.4) from /usr/lib64/python3.5/site-packages/sphinx/ext/graphviz.py
#   sphinxext.gen_rst (unknown version) from /var/tmp/portage/dev-python/matplotlib-1.4.3/work/matplotlib-1.4.3-python3_5/doc/sphinxext/gen_rst.py
#   matplotlib.sphinxext.only_directives (unknown version) from /var/tmp/portage/dev-python/matplotlib-1.4.3/work/matplotlib-1.4.3-python3_5/build/build/lib/matplotlib/sphinxext/only_directives.py
#   sphinx.ext.inheritance_diagram (1.3.4) from /usr/lib64/python3.5/site-packages/sphinx/ext/inheritance_diagram.py
#   matplotlib.sphinxext.plot_directive (unknown version) from /var/tmp/portage/dev-python/matplotlib-1.4.3/work/matplotlib-1.4.3-python3_5/build/build/lib/matplotlib/sphinxext/plot_directive.py
#   numpydoc (unknown version) from /usr/lib64/python3.5/site-packages/numpydoc/__init__.py
#   IPython.sphinxext.ipython_console_highlighting (unknown version) from /usr/lib64/python3.5/site-packages/IPython/sphinxext/ipython_console_highlighting.py
#   alabaster (0.7.7) from /usr/lib64/python3.5/site-packages/alabaster/__init__.py
#   sphinxext.math_symbol_table (unknown version) from /var/tmp/portage/dev-python/matplotlib-1.4.3/work/matplotlib-1.4.3-python3_5/doc/sphinxext/math_symbol_table.py
#   sphinx.ext.autosummary (1.3.4) from /usr/lib64/python3.5/site-packages/sphinx/ext/autosummary/__init__.py
#   sphinxext.github (unknown version) from /var/tmp/portage/dev-python/matplotlib-1.4.3/work/matplotlib-1.4.3-python3_5/doc/sphinxext/github.py
#   sphinxext.gen_gallery (unknown version) from /var/tmp/portage/dev-python/matplotlib-1.4.3/work/matplotlib-1.4.3-python3_5/doc/sphinxext/gen_gallery.py
Traceback (most recent call last):
  File "/usr/lib64/python3.5/site-packages/sphinx/cmdline.py", line 244, in main
    app.build(opts.force_all, filenames)
  File "/usr/lib64/python3.5/site-packages/sphinx/application.py", line 266, in build
    self.builder.build_update()
  File "/usr/lib64/python3.5/site-packages/sphinx/builders/__init__.py", line 251, in build_update
    'out of date' % len(to_build))
  File "/usr/lib64/python3.5/site-packages/sphinx/builders/__init__.py", line 265, in build
    self.doctreedir, self.app))
  File "/usr/lib64/python3.5/site-packages/sphinx/environment.py", line 618, in update
    self._read_serial(docnames, app)
  File "/usr/lib64/python3.5/site-packages/sphinx/environment.py", line 638, in _read_serial
    self.read_doc(docname, app)
  File "/usr/lib64/python3.5/site-packages/sphinx/environment.py", line 791, in read_doc
    pub.publish()
  File "/usr/lib64/python3.5/site-packages/docutils/core.py", line 218, in publish
    self.apply_transforms()
  File "/usr/lib64/python3.5/site-packages/docutils/core.py", line 199, in apply_transforms
    self.document.transformer.apply_transforms()
  File "/usr/lib64/python3.5/site-packages/docutils/transforms/__init__.py", line 171, in apply_transforms
    transform.apply(**kwargs)
  File "/usr/lib64/python3.5/site-packages/sphinx/transforms.py", line 182, in apply
    apply_source_workaround(n)
  File "/usr/lib64/python3.5/site-packages/sphinx/util/nodes.py", line 53, in apply_source_workaround
    '\s*:\s*%s' % classifier.astext(), '', node.rawsource)
  File "/usr/lib64/python3.5/re.py", line 182, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "/usr/lib64/python3.5/re.py", line 293, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/usr/lib64/python3.5/sre_compile.py", line 536, in compile
    p = sre_parse.parse(p, flags)
  File "/usr/lib64/python3.5/sre_parse.py", line 829, in parse
    p = _parse_sub(source, pattern, 0)
  File "/usr/lib64/python3.5/sre_parse.py", line 437, in _parse_sub
    itemsappend(_parse(source, state))
  File "/usr/lib64/python3.5/sre_parse.py", line 781, in _parse
    source.tell() - start)
sre_constants.error: missing ), unterminated subpattern at position 36

@jenshnielsen
Copy link
Member

Yes Im seeing this too. It builds correctly with Sphinx 1.3.3

@jenshnielsen
Copy link
Member

The problem is somewhere in the patches api autodoc. Disabling this and it builds correctly.

@jenshnielsen
Copy link
Member

Note to self. The issue is somewhere in the ConnectionStyle docs. The error from sphinx is not very help full

@tacaswell tacaswell added this to the next major release (2.0) milestone Jan 17, 2016
@tacaswell
Copy link
Member

Do we think sphinx broke or was fixed between 1.3.3 and 1.3.4?

gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Jan 17, 2016
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=571996 Github: matplotlib/matplotlib#5869

Package-Manager: portage-2.2.26
Signed-off-by: Justin Lecher <jlec@gentoo.org>
@jenshnielsen
Copy link
Member

I don't know yet. We will see when I have found the exact spot. I am in the middle of manually bisecting it. I definitly think the error message could be better and will probably report that at the least.

@jenshnielsen
Copy link
Member

It seems to fail on matching the parenthesis in *angle* : angle of the connecting line (if None, parallel to A and B) on https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/patches.py#L3021 due to the new line. Removing the newline fixes the compilation (but violates pep8 )

@tacaswell
Copy link
Member

Should probably just re-do that docstring as proper numpydoc style...

@matthew-brett
Copy link
Contributor

Related : sphinx-doc/sphinx#2247 ?

@jenshnielsen
Copy link
Member

That looks quite likely

@jenshnielsen
Copy link
Member

For reference sphinx-doc/sphinx#2247 has been resolved by Sphinx 1.3.5 and our docs build with a single warning. Solved by #5872

@jlec
Copy link
Author

jlec commented Jan 25, 2016

Work here, when backported to 1.5.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants