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

2020-05-19 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  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.

REPOSITORY
  R264 KApiDox

BRANCH
  makedepworkwithpython3

REVISION DETAIL
  https://phabricator.kde.org/D29797

To: kossebau, #frameworks, ochurlaud, ognarb, cblack, winterz, francescorios
Cc: asturmlechner, kde-frameworks-devel, kde-doc-english, LeGast00n, cblack, 
gennad, fbampaloukas, michaelh, ngraham, bruns, skadinna


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

2020-05-17 Thread Friedrich W. H. Kossebau
kossebau added reviewers: winterz, francescorios.

REPOSITORY
  R264 KApiDox

BRANCH
  makedepworkwithpython3

REVISION DETAIL
  https://phabricator.kde.org/D29797

To: kossebau, #frameworks, ochurlaud, ognarb, cblack, winterz, francescorios
Cc: asturmlechner, kde-frameworks-devel, kde-doc-english, LeGast00n, cblack, 
gennad, fbampaloukas, michaelh, ngraham, bruns, skadinna


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

2020-05-17 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  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.

REPOSITORY
  R264 KApiDox

BRANCH
  makedepworkwithpython3

REVISION DETAIL
  https://phabricator.kde.org/D29797

To: kossebau, #frameworks, ochurlaud, ognarb, cblack
Cc: asturmlechner, kde-frameworks-devel, kde-doc-english, LeGast00n, cblack, 
gennad, fbampaloukas, michaelh, ngraham, bruns, skadinna


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

2020-05-16 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  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.

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


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

2020-05-16 Thread Carl Schwan
ognarb added a comment.


  In 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


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

2020-05-16 Thread Carson Black
cblack added a comment.


  In 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
  >  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.

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


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

2020-05-16 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  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?

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


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

2020-05-16 Thread Carson Black
cblack accepted this revision.

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


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

2020-05-16 Thread Carl Schwan
ognarb accepted this revision.
ognarb added a comment.
This revision is now accepted and ready to land.


  +1 and also +1 for removing python2 support

REPOSITORY
  R264 KApiDox

BRANCH
  makedepworkwithpython3

REVISION DETAIL
  https://phabricator.kde.org/D29797

To: kossebau, #frameworks, ochurlaud, ognarb
Cc: kde-frameworks-devel, kde-doc-english, LeGast00n, cblack, gennad, 
fbampaloukas, michaelh, ngraham, bruns, skadinna


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

2020-05-16 Thread Friedrich W. H. Kossebau
kossebau created this revision.
kossebau added reviewers: Frameworks, ochurlaud, ognarb.
Herald added projects: Frameworks, Documentation.
Herald added subscribers: kde-doc-english, kde-frameworks-devel.
kossebau requested review of this revision.

REVISION SUMMARY
  This patch makies kapidox work for me when also generating dependency
  diagrams, both locally with what openSUSE TW provides as well as what there
  is now on the updated zivo (api.kde.org).
  
  Uploaded for first feedback, surely needs more refinement.
  
  Not being a real Python developer myself, this is just naive sample-based 
hackery and was
  not tested against Python2 (possibly breaking things due to the string
  stuff). Though I guess everyone agrees we should simply drop now the Python2
  support from kapidix, with api.kde.org server no longer needing it.

REPOSITORY
  R264 KApiDox

BRANCH
  makedepworkwithpython3

REVISION DETAIL
  https://phabricator.kde.org/D29797

AFFECTED FILES
  src/kapidox/depdiagram/framework.py
  src/kapidox/depdiagram/frameworkdb.py
  src/kapidox/depdiagram/generate.py
  src/kapidox/depdiagram/gvutils.py
  src/kapidox/preprocessing.py

To: kossebau, #frameworks, ochurlaud, ognarb
Cc: kde-frameworks-devel, kde-doc-english, LeGast00n, cblack, gennad, 
fbampaloukas, michaelh, ngraham, bruns, skadinna