Thanks to visit codestin.com
Credit goes to github.com

Skip to content

3.0.8: sphinx is failing #384

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

Open
kloczek opened this issue Apr 10, 2022 · 11 comments
Open

3.0.8: sphinx is failing #384

kloczek opened this issue Apr 10, 2022 · 11 comments

Comments

@kloczek
Copy link

kloczek commented Apr 10, 2022

Looks like latest sphins is failing on generate documentation

+ sphinx-build -n -T -W -b man docs build/sphinx/man
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 6 added, 0 changed, 0 removed
reading sources... [100%] whats_new_in_3_0_0

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 276, in build_main
    app.build(args.force_all, filenames)
  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 330, in build
    self.builder.build_update()
  File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 283, in build_update
    self.build(['__all__'], to_build)
  File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 300, in build
    updated_docnames = set(self.read())
  File "/usr/lib64/python3.8/contextlib.py", line 120, in __exit__
    next(self.gen)
  File "/usr/lib/python3.8/site-packages/sphinx/util/logging.py", line 217, in pending_warnings
    memhandler.flushTo(logger)
  File "/usr/lib/python3.8/site-packages/sphinx/util/logging.py", line 182, in flushTo
    logger.handle(record)
  File "/usr/lib64/python3.8/logging/__init__.py", line 1599, in handle
    self.callHandlers(record)
  File "/usr/lib64/python3.8/logging/__init__.py", line 1661, in callHandlers
    hdlr.handle(record)
  File "/usr/lib64/python3.8/logging/__init__.py", line 950, in handle
    rv = self.filter(record)
  File "/usr/lib64/python3.8/logging/__init__.py", line 811, in filter
    result = f.filter(record)
  File "/usr/lib/python3.8/site-packages/sphinx/util/logging.py", line 425, in filter
    raise exc
sphinx.errors.SphinxWarning: invalid signature for autoclass ('pyparsing::pyparsing_unicode.עִברִית')

Warning, treated as error:
invalid signature for autoclass ('pyparsing::pyparsing_unicode.עִברִית')
@ptmcg
Copy link
Member

ptmcg commented Apr 10, 2022

I don't think this is anything new. That is a valid Python identifier.

@kloczek
Copy link
Author

kloczek commented Apr 10, 2022

OK so what should be fixed to be able to render documentation? 🤔

@ptmcg
Copy link
Member

ptmcg commented Apr 10, 2022

I would ask you to open a ticket with sphinx, since it is their code that is stumbling over what looks to me like valid doc strings and Python identifiers. However, adding support for right-to-left characters (as in Hebrew and Arabic) may be a challenge, so I would not expect results right away. If there is some kind of #noqa marker that I could add to the pyparsing code to work around this issue, I would consider it, but it would be nice if the sphinx doc generation code could actually handle this.

@kloczek
Copy link
Author

kloczek commented May 11, 2022

Just tested 3.0.9 and it looks bettr. I'm able to generate documentation however there is a lot warnings

+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 6 added, 0 changed, 0 removed
reading sources... [100%] whats_new_in_3_0_0
WARNING: invalid signature for autoclass ('pyparsing::pyparsing_unicode.עִברִית')
WARNING: don't know which module to import for autodocumenting 'pyparsing::pyparsing_unicode.עִברִית' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
WARNING: invalid signature for autoclass ('pyparsing::pyparsing_unicode.देवनागरी')
WARNING: don't know which module to import for autodocumenting 'pyparsing::pyparsing_unicode.देवनागरी' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.OneOrMore:6: ERROR: Unexpected indentation.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/results.py:docstring of pyparsing.results.ParseResults.List:11: ERROR: Unexpected indentation.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/results.py:docstring of pyparsing.results.ParseResults.List:12: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.__add__:1: WARNING: Inline interpreted text or phrase reference start-string without end-string.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.__call__:6: WARNING: Inline literal start-string without end-string.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.__mul__:6: ERROR: Unexpected indentation.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.__mul__:8: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.create_diagram:5: ERROR: Unexpected indentation.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.create_diagram:6: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.create_diagram:11: WARNING: Bullet list ends without a blank line; unexpected unindent.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.parse_string:11: WARNING: Inline interpreted text or phrase reference start-string without end-string.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.parse_string:11: WARNING: Inline interpreted text or phrase reference start-string without end-string.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.run_tests:9: ERROR: Unexpected indentation.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.run_tests:10: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.run_tests:9: ERROR: Unexpected indentation.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.run_tests:10: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.set_name:3: ERROR: Unexpected indentation.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.set_name:3: ERROR: Unexpected indentation.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.SkipTo:7: ERROR: Unexpected indentation.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.SkipTo:9: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.Suppress.__add__:1: WARNING: Inline interpreted text or phrase reference start-string without end-string.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.Word:4: ERROR: Unexpected indentation.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.Word:7: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ZeroOrMore:6: ERROR: Unexpected indentation.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/__init__.py:docstring of pyparsing.helpers.infix_notation:15: ERROR: Unexpected indentation.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/__init__.py:docstring of pyparsing.helpers.infix_notation:16: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/__init__.py:docstring of pyparsing.helpers.infix_notation:15: ERROR: Unexpected indentation.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/__init__.py:docstring of pyparsing.helpers.infix_notation:16: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/__init__.py:docstring of pyparsing.helpers.nested_expr:6: ERROR: Unexpected indentation.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/__init__.py:docstring of pyparsing.helpers.nested_expr:7: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/__init__.py:docstring of pyparsing.helpers.nested_expr:6: ERROR: Unexpected indentation.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/__init__.py:docstring of pyparsing.helpers.nested_expr:7: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/docs/whats_new_in_3_0_0.rst:203: WARNING: Title underline too short.

Support for yielding native Python ``list`` and ``dict`` types in place of ``ParseResults``
-------------------------------------------------------------------------------
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/docs/whats_new_in_3_0_0.rst:203: WARNING: Title underline too short.

Support for yielding native Python ``list`` and ``dict`` types in place of ``ParseResults``
-------------------------------------------------------------------------------
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/docs/whats_new_in_3_0_0.rst:229: WARNING: Title underline too short.

New Located class to replace ``locatedExpr`` helper method
------------------------------------------------------
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/docs/whats_new_in_3_0_0.rst:229: WARNING: Title underline too short.

New Located class to replace ``locatedExpr`` helper method
------------------------------------------------------
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/docs/whats_new_in_3_0_0.rst:282: WARNING: Title underline too short.

New ``IndentedBlock`` class to replace ``indentedBlock`` helper method
--------------------------------------------------------------
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/docs/whats_new_in_3_0_0.rst:282: WARNING: Title underline too short.

New ``IndentedBlock`` class to replace ``indentedBlock`` helper method
--------------------------------------------------------------
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-pyparsing.3 { whats_new_in_3_0_0 HowToUsePyparsing modules pyparsing CODE_OF_CONDUCT } /home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.Char:1: WARNING: py:class reference target not found: pyparsing.core._WordRegex
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.OneOrMore:1: WARNING: py:class reference target not found: pyparsing.core._MultipleMatch
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/helpers.py:docstring of pyparsing.helpers.OpAssoc:1: WARNING: py:class reference target not found: enum.Enum
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/exceptions.py:docstring of pyparsing.exceptions.ParseSyntaxException:1: WARNING: py:class reference target not found: And._ErrorStop
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement:1: WARNING: py:class reference target not found: abc.ABC
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.create_diagram:: WARNING: py:obj reference target not found: typing.TextIO
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.create_diagram:: WARNING: py:class reference target not found: pathlib.Path
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.parse_file:: WARNING: py:class reference target not found: pathlib.Path
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.parse_file:: WARNING: py:obj reference target not found: typing.TextIO
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.parse_file:: WARNING: py:class reference target not found: pathlib.Path
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.parse_file:: WARNING: py:obj reference target not found: typing.TextIO
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.run_tests:: WARNING: py:obj reference target not found: typing.TextIO
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.run_tests:: WARNING: py:obj reference target not found: typing.TextIO
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ParserElement.suppress_warning:: WARNING: py:class reference target not found: pyparsing.core.Diagnostics
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.Regex:: WARNING: py:class reference target not found: re.RegexFlag
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.Regex.__init__:: WARNING: py:class reference target not found: re.RegexFlag
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.Word:34: WARNING: py:class reference target not found: alphas
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.Word:35: WARNING: py:class reference target not found: nums
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.Word:36: WARNING: py:class reference target not found: alphanums
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.Word:37: WARNING: py:class reference target not found: hexnums
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.Word:38: WARNING: py:class reference target not found: alphas8bit
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.Word:40: WARNING: py:class reference target not found: punc8bit
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.Word:42: WARNING: py:class reference target not found: printables
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.Word:44: WARNING: py:class reference target not found: pyparsing_unicode`
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.ZeroOrMore:1: WARNING: py:class reference target not found: pyparsing.core._MultipleMatch
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.__compat__:1: WARNING: py:class reference target not found: pyparsing.util.__config_flags
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/core.py:docstring of pyparsing.core.__diag__:1: WARNING: py:class reference target not found: pyparsing.util.__config_flags
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/__init__.py:docstring of pyparsing.helpers.nested_expr:11: WARNING: py:class reference target not found: quoted_string
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/__init__.py:docstring of pyparsing.helpers.nested_expr:20: WARNING: py:class reference target not found: quoted_string
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/__init__.py:docstring of pyparsing.helpers.nested_expr:11: WARNING: py:class reference target not found: quoted_string
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/__init__.py:docstring of pyparsing.helpers.nested_expr:20: WARNING: py:class reference target not found: quoted_string
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/common.py:docstring of pyparsing.common.pyparsing_common:13: WARNING: py:class reference target not found: url
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/common.py:docstring of pyparsing.common.pyparsing_common:17: WARNING: py:class reference target not found: convertToInteger
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/common.py:docstring of pyparsing.common.pyparsing_common:18: WARNING: py:class reference target not found: convertToFloat
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/common.py:docstring of pyparsing.common.pyparsing_common:22: WARNING: py:class reference target not found: upcaseTokens
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/common.py:docstring of pyparsing.common.pyparsing_common:23: WARNING: py:class reference target not found: downcaseTokens
/home/tkloczko/rpmbuild/BUILD/pyparsing-pyparsing_3.0.9/pyparsing/testing.py:docstring of pyparsing.testing.pyparsing_test.TestParseResultsAsserts.assertRunTestResults:: WARNING: py:class reference target not found: expected_parse_results
done
build succeeded, 79 warnings.

@ptmcg
Copy link
Member

ptmcg commented May 11, 2022

Ok, this takes me back... cleaning up docstrings to make sphinx happy. At least we are getting docs now. And this looks more like something in my control. Thanks for the update.

@ptmcg
Copy link
Member

ptmcg commented May 11, 2022

Well, I took a run at this, but setting up sphinx-build at 2am is not going to work. Some of the warnings are obvious (like Title underline too short), but the fixes for most of the others are speculation on my part.

I just pushed out a release, so I don't expect to make any changes for a bit, so this is a good time for a cleanup of the docstrings. Since you have sphinx up and running and can edit/verify changes as you make them, could you please go through and make the necessary docstring changes and submit as a PR?

@ptmcg
Copy link
Member

ptmcg commented May 14, 2022

I've fixed the too-short title underlines, not sure what the fix is for the rest of them (maybe don't run with -n?).

@kloczek
Copy link
Author

kloczek commented May 14, 2022

@ptmcg
Copy link
Member

ptmcg commented Jun 10, 2022

More docstring fixes have been submitted - please see latest.

@kloczek
Copy link
Author

kloczek commented Jun 10, 2022

OK one sec 😋

@kloczek
Copy link
Author

kloczek commented Jun 10, 2022

I cannot apply all master patches becuse there are some binary patches which GNU patch cannot handle.
Will rechech those changes on next release.
If you are thinking that issue is fixed now feel free to close that ticket. I'm keepinthack of that ticket so will will confirm fixed issue (or not) when new version will be available.

If may I two suggestions:

  • pass source tree over pytest --black (you need to have installed pytest-black) and apply patch generated by that pytest ext
  • change tagging colvention from currnt pyparsing_<version> to just <versiion>. It would make easier use autogenerated from git tag by github tar balls as input source on packagin. That sutogenerated tar ball has always base direcory name assembed from <repo_name>-<git_tag> so su crrently it is generated tar ball with base dir like pyparsing-pyparsing_<version>/. Yoiu can see that in https://github.com/pyparsing/pyparsing/archive/refs/tags/pyparsing_3.0.9.tar.gz

Thx

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

No branches or pull requests

2 participants