Skip to content

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

Closed

Description

@jlec

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

Activity

  1. jlec commented on Jan 17, 2016

    @jlec
    Author

    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
  2. jenshnielsen commented on Jan 17, 2016

    @jenshnielsen
    Member

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

  3. jenshnielsen commented on Jan 17, 2016

    @jenshnielsen
    Member

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

  4. jenshnielsen commented on Jan 17, 2016

    @jenshnielsen
    Member

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

  5. added this to the milestone on Jan 17, 2016
  6. tacaswell commented on Jan 17, 2016

    @tacaswell
    Member

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

  7. jenshnielsen commented on Jan 17, 2016

    @jenshnielsen
    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.

  8. jenshnielsen commented on Jan 17, 2016

    @jenshnielsen
    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 )

  9. tacaswell commented on Jan 17, 2016

    @tacaswell
    Member

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

  10. matthew-brett commented on Jan 18, 2016

    @matthew-brett
    Contributor
  11. jenshnielsen commented on Jan 18, 2016

    @jenshnielsen
    Member

    That looks quite likely

  12. jenshnielsen commented on Jan 24, 2016

    @jenshnielsen
    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

  13. jlec commented on Jan 25, 2016

    @jlec
    Author

    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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions