Skip to content

Add support for Python 3

Two first steps of futurize (https://python-future.org/futurize.html) have been run on cleanup_Urania10:

futurize --stage1 -w `find * -name '*.py'`
futurize --stage2 -w `find * -name '*.py'`

There are two files which are not parseable (the syntax does not make sense, @adudziak @kheinick could you please have a look and fix them? please target this branch instead of cleanup_Urania10):

RefactoringTool: Can't parse PhysFit/B2DXFitters/data/Bs2DsK_Run2CPV/Bs2DsPi/BiasedSFit/BiasedDMSFit.py: ParseError: bad input: type=26, value='{', context=(' ', (7, 9))
RefactoringTool: Can't parse PhysFit/B2DXFitters/data/Bs2DsK_Run2CPV/Bs2DsPi/BiasedSFit/MDFit.py: ParseError: bad input: type=26, value='{', context=(' ', (6, 9))

@dhill @poluekt @adudziak @kheinick Please check the changes in this MR, most of them are refactoring or adaptations to Py3. It would be desirable if you can run some checks and ensure this code does what is expected (comparing it with Py2 versions in cleanup_Urania10).

Thanks!

Edited by Carlos Vazquez Sierra

Merge request reports