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

Python 3.12 Deprecation Warnings and Runtime script error #241

Open
AmeyaVS opened this issue Mar 27, 2024 · 1 comment
Open

Python 3.12 Deprecation Warnings and Runtime script error #241

AmeyaVS opened this issue Mar 27, 2024 · 1 comment

Comments

@AmeyaVS
Copy link

AmeyaVS commented Mar 27, 2024

I am having issue running mcss with a 3rd party tools which has a dependency on generating documentation using this tool.

Following Deprecation Warning and Error is captured:

/home/ameya/tools/mcss/documentation/doxygen.py:2364: DeprecationWarning: Testing an element's truth value will raise an exception in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  compound.has_details = compound.kind == 'group' or compound.brief or compounddef.find('detaileddescription') or (compound.kind == 'page' and not is_a_stupid_empty_markdown_page(compounddef))
/home/ameya/tools/mcss/documentation/doxygen.py:3420: DeprecationWarning: Testing an element's truth value will raise an exception in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if entry.id not in state.compounds or not state.compounds[entry.id].has_details:
/home/ameya/tools/mcss/documentation/doxygen.py:2627: DeprecationWarning: Testing an element's truth value will raise an exception in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not compounddef.find('briefdescription') and not compounddef.find('detaileddescription') and not compounddef.attrib['kind'] == 'group' and (not compounddef.attrib['kind'] == 'page' or is_a_stupid_empty_markdown_page(compounddef)):
WARNING:root:classslang_1_1ast_1_1_compilation.xml: doxygen is unable to cross-link friend class Lookup, ignoring, sorry
WARNING:root:classslang_1_1ast_1_1_compilation.xml: doxygen is unable to cross-link friend class Scope, ignoring, sorry
Traceback (most recent call last):
  File "/home/ameya/tools/mcss/documentation/doxygen.py", line 4015, in <module>
    run(state, templates=os.path.abspath(args.templates), wildcard=args.wildcard, index_pages=args.index_pages, search_merge_subtrees=not args.search_no_subtree_merging, search_add_lookahead_barriers=not args.search_no_lookahead_barriers, search_merge_prefixes=not args.search_no_prefix_merging)
  File "/home/ameya/tools/mcss/documentation/doxygen.py", line 3872, in run
    parsed = parse_xml(state, file)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ameya/tools/mcss/documentation/doxygen.py", line 3034, in parse_xml
    member = parse_enum(state, memberdef)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ameya/tools/mcss/documentation/doxygen.py", line 1859, in parse_enum
    if enum.name.startswith('@'): enum.name = '(anonymous)'
       ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'startswith'

I am on a system with Python 3.12 installed.

@mosra
Copy link
Owner

mosra commented Mar 27, 2024

Assuming you're on Doxygen 1.9 or newer, the error is probably related to #215 or #239. Unfortunately I don't have an estimate when I'll be able to get back to that (it's a nightmare, every new version breaks a ton of things that I have to work around), so for the time being a solution is using an older version of Doxygen. (Personally I'm on 1.8.16.)

The deprecation warnings OTOH are easy to fix I think. I'll look into those. Thanks!

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