Using kapidox_generate with python3 & python2 works
Why should Python 2 continue to be supported, after its EOL on 2020-01-01?
What cases would a user be running the latest KDE release, but still have a Python 2 interpreter present as their primary/only Python interpreter?
Because the very user api.kde.org right now in production still uses python2 sadly (edit: see comments on D25632 for how i fails). And replacing that server with something modern is sadly not a few-hours job, still waiting for someone to spend the weeks on getting a substitution done.
This probably needs to be import gvutils from kapidox.depdiagram otherwise any calling code will need to be kapidox.depdiagram.gvutils.<whatever> instead of just fvutils.<whatever> (unless Python3 allows something special i'm not aware of)
As said no Python developer myself, but the code using the import is like this a few times below:
for node_handle in gvutils.get_node_list(src_handle): node = gvutils.Node(node_handle)
so something there seems to work? Also this is the current import code added in D25632 to have it work with Python3, so my expectation would have rather been this is correct?
To add to my confusion, running the unpatched version works with my local 2.7.17 python interpreter (checked with print (sys.version)) and worse, running things manually on api.kde.org in some test subdir also works with its 2.7.15...
Now why does it fail in the cronjob...
For now, given @bcooksley's comment going to try some simple change to 'from kapidox.depdiagram import gvutils', this is a pattern found elsewhere in the old code. Will do a local patch to the checkout on the server and see if this has any effect on next cron job run. So far that also worked for all the 3 situations I tested (local python3 & python2, python2 on server test env).
All that while awaiting Python gurus to bring in the light :)
Brown paper bag for me: if one changes code, they should also see to trigger
that code, in this case passing the --depdiagram-dot-dir arg to
I can confirm now in my testing on the server that things fail without the
patch, and work with this simple change Ben hinted to :)
Last night's run of api.kde.org generation with kapidox locally patched with this change worked again,
So unless there are objections will push then latest next WE, though happy to have people give green light before :)