D29797: [RAW PATCH] Unbreak generation with dep diagrams with Python 3 (& break P2 :) )

Carl Schwan noreply at phabricator.kde.org
Sat May 16 20:27:39 BST 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-doc-english/attachments/20200516/c6937a18/attachment.htm>


More information about the kde-doc-english mailing list