D26652: Unbreak module imports for Python2

2020-01-17 Thread Friedrich W. H. Kossebau
This revision was automatically updated to reflect the committed changes.
Closed by commit R264:eae0cd8a6ed9: Unbreak module imports for Python2 
(authored by kossebau).

REPOSITORY
  R264 KApiDox

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26652?vs=73513=73762

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

AFFECTED FILES
  src/kapidox/depdiagram/frameworkdb.py

To: kossebau, ochurlaud, cordlandwehr, davidedmundson
Cc: bcooksley, awilcox, kde-frameworks-devel, kde-doc-english, LeGast00n, 
gennad, fbampaloukas, GB_2, michaelh, ngraham, bruns, skadinna


D26652: Unbreak module imports for Python2

2020-01-15 Thread David Edmundson
davidedmundson accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R264 KApiDox

BRANCH
  fixpython2support

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

To: kossebau, ochurlaud, cordlandwehr, davidedmundson
Cc: bcooksley, awilcox, kde-frameworks-devel, kde-doc-english, LeGast00n, 
gennad, fbampaloukas, GB_2, michaelh, ngraham, bruns, skadinna


D26652: Unbreak module imports for Python2

2020-01-14 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  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 :)

REPOSITORY
  R264 KApiDox

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

To: kossebau, ochurlaud, cordlandwehr
Cc: bcooksley, awilcox, kde-frameworks-devel, kde-doc-english, LeGast00n, 
gennad, fbampaloukas, GB_2, michaelh, ngraham, bruns, skadinna


D26652: Unbreak module imports for Python2

2020-01-14 Thread Friedrich W. H. Kossebau
kossebau updated this revision to Diff 73513.
kossebau added a comment.


  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
  kapidox_generate...
  
  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 :)

REPOSITORY
  R264 KApiDox

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26652?vs=73488=73513

BRANCH
  fixpython2support

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

AFFECTED FILES
  src/kapidox/depdiagram/frameworkdb.py

To: kossebau, ochurlaud, cordlandwehr
Cc: bcooksley, awilcox, kde-frameworks-devel, kde-doc-english, LeGast00n, 
gennad, fbampaloukas, GB_2, michaelh, ngraham, bruns, skadinna


D26652: Unbreak module imports for Python2

2020-01-14 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  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 :)

REPOSITORY
  R264 KApiDox

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

To: kossebau, ochurlaud, cordlandwehr
Cc: bcooksley, awilcox, kde-frameworks-devel, kde-doc-english, LeGast00n, 
gennad, fbampaloukas, GB_2, michaelh, ngraham, bruns, skadinna


D26652: Unbreak module imports for Python2

2020-01-14 Thread Friedrich W. H. Kossebau
kossebau added a comment.


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

REPOSITORY
  R264 KApiDox

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

To: kossebau, ochurlaud, cordlandwehr
Cc: bcooksley, awilcox, kde-frameworks-devel, kde-doc-english, LeGast00n, 
gennad, fbampaloukas, GB_2, michaelh, ngraham, bruns, skadinna


D26652: Unbreak module imports for Python2

2020-01-14 Thread Friedrich W. H. Kossebau
kossebau added inline comments.

INLINE COMMENTS

> bcooksley wrote in frameworkdb.py:39
> This probably needs to be `import gvutils from kapidox.depdiagram` otherwise 
> any calling code will need to be `kapidox.depdiagram.gvutils.` 
> instead of just `fvutils.` (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?

REPOSITORY
  R264 KApiDox

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

To: kossebau, ochurlaud, cordlandwehr
Cc: bcooksley, awilcox, kde-frameworks-devel, kde-doc-english, LeGast00n, 
gennad, fbampaloukas, GB_2, michaelh, ngraham, bruns, skadinna


D26652: Unbreak module imports for Python2

2020-01-14 Thread Ben Cooksley
bcooksley added inline comments.

INLINE COMMENTS

> frameworkdb.py:39
> +else:
> +import kapidox.depdiagram.gvutils
> +from kapidox.depdiagram.framework import Framework

This probably needs to be `import gvutils from kapidox.depdiagram` otherwise 
any calling code will need to be `kapidox.depdiagram.gvutils.` 
instead of just `fvutils.` (unless Python3 allows something special 
i'm not aware of)

REPOSITORY
  R264 KApiDox

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

To: kossebau, ochurlaud, cordlandwehr
Cc: bcooksley, awilcox, kde-frameworks-devel, kde-doc-english, LeGast00n, 
gennad, fbampaloukas, GB_2, michaelh, ngraham, bruns, skadinna


D26652: Unbreak module imports for Python2

2020-01-14 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  Because the very user api.kde.org right now in production still uses python2 
sadly. 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.

REPOSITORY
  R264 KApiDox

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

To: kossebau, ochurlaud, cordlandwehr
Cc: awilcox, kde-frameworks-devel, kde-doc-english, LeGast00n, gennad, 
fbampaloukas, GB_2, michaelh, ngraham, bruns, skadinna


D26652: Unbreak module imports for Python2

2020-01-14 Thread A. Wilcox
awilcox added a comment.


  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?

REPOSITORY
  R264 KApiDox

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

To: kossebau, ochurlaud, cordlandwehr
Cc: awilcox, kde-frameworks-devel, kde-doc-english, LeGast00n, gennad, 
fbampaloukas, GB_2, michaelh, ngraham, bruns, skadinna


D26652: Unbreak module imports for Python2

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

TEST PLAN
  Using kapidox_generate with python3 & python2 works

REPOSITORY
  R264 KApiDox

BRANCH
  fixpython2support

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

AFFECTED FILES
  src/kapidox/depdiagram/__init__.py
  src/kapidox/depdiagram/frameworkdb.py

To: kossebau, ochurlaud, cordlandwehr
Cc: kde-frameworks-devel, kde-doc-english, LeGast00n, gennad, fbampaloukas, 
GB_2, michaelh, ngraham, bruns, skadinna