A cheat sheet is available at http://python-future.org/compatible_idioms.html that details the differences between Python 2 & 3 code. Most of our incompatibilities fall in to one of three categories:
print is now a function and requires parentheses in Python 3
commas not allowed in except clauses.
dict.iteritems() no longer exists
We need to maintain compatibility with Python 2. See the Python 3 page on the wiki for more detail. You should build mantid with python3 in order to test your changes.
I've tried to grouped the files where it makes sense but feel free to move them around if required. You should also look at and fix any systemtests that relate to the files you are changing. The systemtests are run nightly with python 3 here.
You can look at the previous work on the Python Algorithms for examples of how to do things, see #16739
This is an umbrella issue. Please add your username to the list below and include this ticket number in your PR.
~@AntonPiccardoSelg #18808~
~@AntonPiccardoSelg #18801~
~@AntonPiccardoSelg #18634~
~@AntonPiccardoSelg #18814~
~@soininen #19848~
~@AntonPiccardoSelg #18803~
~no longer in the repository~
~done~
~@peterfpeterson #20278~
~@granrothge #19747~
~@peterfpeterson #20278~
~@PranavBahuguna #18849~
~@mducle #18913~
~@peterfpeterson #20290~
~@dymkowsk #19816~
~@peterfpeterson #20347~
~@DavidFair Will open a separate issue as part of #17831~
~@rosswhitfield #20353~
~done~
~@anthonyLim23 #19828~
~@rosswhitfield #18895~
~@anthonyLim23 #19817~
MISC group @rosswhitfield #20354
A cheat sheet is available at http://python-future.org/compatible_idioms.html that details the differences between Python 2 & 3 code. Most of our incompatibilities fall in to one of three categories:
print
is now a function and requires parentheses in Python 3except
clauses.dict.iteritems()
no longer existsWe need to maintain compatibility with Python 2. See the Python 3 page on the wiki for more detail. You should build mantid with python3 in order to test your changes.
I've tried to grouped the files where it makes sense but feel free to move them around if required. You should also look at and fix any systemtests that relate to the files you are changing. The systemtests are run nightly with python 3 here.
You can look at the previous work on the Python Algorithms for examples of how to do things, see #16739
This is an umbrella issue. Please add your username to the list below and include this ticket number in your PR.
Group 1Group 2Group 3Group 4Group 5Group 6Group 7Group 8Group 9Group 10Group 11Group 12Group 13Group 14Group 15Group 16Group 17Group 18
Group 19
Group 20
Group 21Group 22Misc, to be grouped (move them to your group if needed)