Works on the new zivo setup (api.kde.org) now having Python 3.
Python2 support not tested, but breaking any support on purpose,
as zivo was the last reason to still support it.
ochurlaud | |
ognarb | |
cblack | |
winterz | |
francescorios |
Frameworks |
Works on the new zivo setup (api.kde.org) now having Python 3.
Python2 support not tested, but breaking any support on purpose,
as zivo was the last reason to still support it.
No Linters Available |
No Unit Test Coverage |
Buildable 26994 | |
Build 27012: arc lint + arc unit |
Thanks for the (first) review :)
Open questions I have are these:
a) how to properly check for the presence of the yaml.safe_load() method? and whether to support a fallback to load() otherwise? It was only introduced at a certain version of pyyaml
b) by supposedly breaking support for Python 2, how to properly catch any usage of python2 now?
Best thing to do would be a follow-up patch that uses python3 shebangs. But frankly, I wouldn't care about Python 2. It's been EOL for half a year now and people have had more than enough time to migrate to Python 3.
Something like this should work
try: result = yaml.safe_load() except AttributeError: result = yaml.load()
But I think you should require having a recent enough version of pyyaml for safe_load() to work. load() is not great in term of security :(
b) by supposedly breaking support for Python 2, how to properly catch any usage of python2 now?
Already answered by @cblack
I just applied the diff as-is to the working checkout of kapidox on the server, to see if the patch also works for the setup of the nightly run, other than my separate testing which might have missed any special environment setup. So tomorrow before noon CEST we should have proof this patch catches all issues.
So no immediate pressure to get this patch out ASAP to also get api.kde.org running again :)
Thanks for the additional replies, will look with attention tomorrow, afk this evening now.
Bah, I patched the wrong kapidox on the server, so last nights run still failed. Oh well... not sure I will have time in the evening for processing this patch, but at least now getting the diff applied also on the right kapidox, so next server check tomorrow.
Patch worked fine also on real server run the last two nights. So going to push later today once at my respective development setup. Will push as is, given safe_load() is now also used without any conditions for the new invent.kde.org git helper :) so doing as the real Python developers do.