The broken module import was covered by the missleading warning
"WARNING Missing Graphviz dependency: diagrams will not be generated."
Details
- Reviewers
ochurlaud - Commits
- R264:f8ff31dc9af0: Fix module imports with Python3
Installed and run kapidox_generate ../kunitconversion/
Diff Detail
- Repository
- R264 KApiDox
- Branch
- bugfix/graphvizImportPython3
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 19308 Build 19326: arc lint + arc unit
Hi. Sadly api.kde.org failed to pick this change up until yesterday, as I had forgotten a change in the local checkout on my last work on the server, which then blocked the update via scripted git pull.
That I fixed partially yesterday, making sure latest KApiDox is run on api.kde.org, but that showed that gentoo(?) server running api.kde.org does not like yet this new code:
Traceback (most recent call last): File "/home/api/kapidox/src/kapidox_generate", line 110, in <module> main() File "/home/api/kapidox/src/kapidox_generate", line 106, in main copyright=kde_copyright) File "/home/api/kapidox/src/kapidox/hlfunctions.py", line 108, in do_it dot_files, tmp_dir) File "/home/api/kapidox/src/kapidox/generator.py", line 646, in generate_diagram with_qt=with_qt) File "/home/api/kapidox/src/kapidox/depdiagram/generate.py", line 156, in generate db.populate(dot_files, with_qt=with_qt) File "/home/api/kapidox/src/kapidox/depdiagram/frameworkdb.py", line 175, in populate fw = parser.parse(tier, dot_file) File "/home/api/kapidox/src/kapidox/depdiagram/frameworkdb.py", line 115, in parse dot_data = preprocess(dot_file) File "/home/api/kapidox/src/kapidox/depdiagram/frameworkdb.py", line 75, in preprocess for node_handle in gvutils.get_node_list(graph_handle): NameError: global name 'gvutils' is not defined
From https://api.kde.org/logs/api/frameworks/frameworks5.log
Seems that new import kapidox.depdiagram.gvutils is something the python there is not digesting as expected? (Edit: which is Python 2.7.15)
Not yet looked further myself, only got up now :)
No python developer myself, but from patterns seen I guess the imports should have some
if sys.version_info.major < 3: // python2 import style else: // python3 import style
?