angr / angr-doc

Documentation for the angr suite
https://docs.angr.io/
BSD 2-Clause "Simplified" License
837 stars 378 forks source link

`test_apidoc.test_lint_docstrings` fails under python 3.8 #417

Closed twizmwazin closed 1 year ago

twizmwazin commented 2 years ago
======================================================================
ERROR: test_apidoc.test_lint_docstrings
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/__w/archinfo/archinfo/build/src/angr-doc/tests/test_apidoc.py", line 49, in test_lint_docstrings
    raise Exception(
Exception: The following warnings were generated while building the API documentation:

Traceback (most recent call last):
  File "/__w/archinfo/archinfo/build/virtualenv/bin/sphinx-build", line 8, in <module>
    from sphinx.cmd.build import main
  File "/__w/archinfo/archinfo/build/virtualenv/lib/python3.8/site-packages/sphinx/cmd/build.py", line 23, in <module>
    from sphinx.application import Sphinx
  File "/__w/archinfo/archinfo/build/virtualenv/lib/python3.8/site-packages/sphinx/application.py", line 35, in <module>
    from sphinx.highlighting import lexer_classes, lexers
  File "/__w/archinfo/archinfo/build/virtualenv/lib/python3.8/site-packages/sphinx/highlighting.py", line 27, in <module>
    from sphinx.ext import doctest
  File "/__w/archinfo/archinfo/build/virtualenv/lib/python3.8/site-packages/sphinx/ext/doctest.py", line 28, in <module>
    from sphinx.builders import Builder
  File "/__w/archinfo/archinfo/build/virtualenv/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 24, in <module>
    from sphinx.io import read_doc
  File "/__w/archinfo/archinfo/build/virtualenv/lib/python3.8/site-packages/sphinx/io.py", line 33, in <module>
    from sphinx.util.rst import append_epilog, docinfo_re, prepend_prolog
  File "/__w/archinfo/archinfo/build/virtualenv/lib/python3.8/site-packages/sphinx/util/rst.py", line 22, in <module>
    from jinja2 import environmentfilter
ImportError: cannot import name 'environmentfilter' from 'jinja2' (/__w/archinfo/archinfo/build/virtualenv/lib/python3.8/site-packages/jinja2/__init__.py)
make: *** [Makefile:56: html] Error 1
twizmwazin commented 2 years ago

This appears to stem from using a very old version of sphinx and an unconstrained jinja2 version. Newer versions of jinja2 do not support python 3.6, so we are silently constrained on a compatible version currently

twizmwazin commented 2 years ago

After upgrading there is a new issue

Traceback (most recent call last):
  File "/__w/archinfo/archinfo/build/src/angr-doc/tests/test_apidoc.py", line 49, in test_lint_docstrings
    raise Exception(
Exception: The following warnings were generated while building the API documentation:

/__w/archinfo/archinfo/build/src/angr/angr/procedures/stubs/format_parser.py:docstring of angr.procedures.stubs.format_parser.FormatParser.arg_session:: WARNING: more than one target found for cross-reference 'ArgSession': angr.calling_conventions.ArgSession, angr.calling_conventions.SimCC.ArgSession
/__w/archinfo/archinfo/build/src/angr/angr/procedures/stubs/format_parser.py:docstring of angr.procedures.stubs.format_parser.ScanfFormatParser.arg_session:: WARNING: more than one target found for cross-reference 'ArgSession': angr.calling_conventions.ArgSession, angr.calling_conventions.SimCC.ArgSession
/__w/archinfo/archinfo/build/src/archinfo/archinfo/arch_aarch64.py:docstring of archinfo.arch_aarch64.ArchAArch64.register_list:: WARNING: more than one target found for cross-reference 'Register': angr.knowledge_plugins.key_definitions.atoms.Register, angr.analyses.stack_pointer_tracker.Register, angr.analyses.disassembly.Register, archinfo.arch.Register
/__w/archinfo/archinfo/build/src/archinfo/archinfo/arch_amd64.py:docstring of archinfo.arch_amd64.ArchAMD64.register_list:: WARNING: more than one target found for cross-reference 'Register': angr.knowledge_plugins.key_definitions.atoms.Register, angr.analyses.stack_pointer_tracker.Register, angr.analyses.disassembly.Register, archinfo.arch.Register
/__w/archinfo/archinfo/build/src/archinfo/archinfo/arch_arm.py:docstring of archinfo.arch_arm.ArchARM.register_list:: WARNING: more than one target found for cross-reference 'Register': angr.knowledge_plugins.key_definitions.atoms.Register, angr.analyses.stack_pointer_tracker.Register, angr.analyses.disassembly.Register, archinfo.arch.Register
/__w/archinfo/archinfo/build/src/archinfo/archinfo/arch_arm.py:docstring of archinfo.arch_arm.ArchARMCortexM.register_list:: WARNING: more than one target found for cross-reference 'Register': angr.knowledge_plugins.key_definitions.atoms.Register, angr.analyses.stack_pointer_tracker.Register, angr.analyses.disassembly.Register, archinfo.arch.Register
/__w/archinfo/archinfo/build/src/archinfo/archinfo/arch_mips32.py:docstring of archinfo.arch_mips32.ArchMIPS32.register_list:: WARNING: more than one target found for cross-reference 'Register': angr.knowledge_plugins.key_definitions.atoms.Register, angr.analyses.stack_pointer_tracker.Register, angr.analyses.disassembly.Register, archinfo.arch.Register
/__w/archinfo/archinfo/build/src/archinfo/archinfo/arch_mips64.py:docstring of archinfo.arch_mips64.ArchMIPS64.register_list:: WARNING: more than one target found for cross-reference 'Register': angr.knowledge_plugins.key_definitions.atoms.Register, angr.analyses.stack_pointer_tracker.Register, angr.analyses.disassembly.Register, archinfo.arch.Register
/__w/archinfo/archinfo/build/src/archinfo/archinfo/arch_ppc32.py:docstring of archinfo.arch_ppc32.ArchPPC32.register_list:: WARNING: more than one target found for cross-reference 'Register': angr.knowledge_plugins.key_definitions.atoms.Register, angr.analyses.stack_pointer_tracker.Register, angr.analyses.disassembly.Register, archinfo.arch.Register
/__w/archinfo/archinfo/build/src/archinfo/archinfo/arch_ppc64.py:docstring of archinfo.arch_ppc64.ArchPPC64.register_list:: WARNING: more than one target found for cross-reference 'Register': angr.knowledge_plugins.key_definitions.atoms.Register, angr.analyses.stack_pointer_tracker.Register, angr.analyses.disassembly.Register, archinfo.arch.Register
/__w/archinfo/archinfo/build/src/archinfo/archinfo/arch_x86.py:docstring of archinfo.arch_x86.ArchX86.register_list:: WARNING: more than one target found for cross-reference 'Register': angr.knowledge_plugins.key_definitions.atoms.Register, angr.analyses.stack_pointer_tracker.Register, angr.analyses.disassembly.Register, archinfo.arch.Register
/__w/archinfo/archinfo/build/src/archinfo/archinfo/arch_s390x.py:docstring of archinfo.arch_s390x.ArchS390X.register_list:: WARNING: more than one target found for cross-reference 'Register': angr.knowledge_plugins.key_definitions.atoms.Register, angr.analyses.stack_pointer_tracker.Register, angr.analyses.disassembly.Register, archinfo.arch.Register

These errors are odd because they are for instance attributes that are not documented beyond their usage. I'm thinking this could somehow be due to automodule incorrectly attempting to infer information where we do not provide any.

github-actions[bot] commented 2 years ago

This issue has been marked as stale because it has no recent activity. Please comment or add the pinned tag to prevent this issue from being closed.

twizmwazin commented 2 years ago

The failure was caused by an upgraded version of sphinx. Pinning old versions of sphinx and jinja allows it to continue to pass, but this still needs to be fixed someday, potentially in sync with #421.

github-actions[bot] commented 1 year ago

This issue has been marked as stale because it has no recent activity. Please comment or add the pinned tag to prevent this issue from being closed.