ognarb added a comment.
In D29797#672263 <https://phabricator.kde.org/D29797#672263>, @kossebau wrote: > 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 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 REPOSITORY R264 KApiDox BRANCH makedepworkwithpython3 REVISION DETAIL https://phabricator.kde.org/D29797 To: kossebau, #frameworks, ochurlaud, ognarb, cblack Cc: kde-frameworks-devel, kde-doc-english, LeGast00n, cblack, gennad, fbampaloukas, michaelh, ngraham, bruns, skadinna