Switch Simfactory to use Python3

Create issue
Issue #2335 open
Steven R. Brandt created an issue

Python2 is officially deprecated. Is it time to move to Python3? See the py3 branch.

Comments (11)

  1. Roland Haas

    This is becoming a bit more urgent since both Debian and Ubuntu seem to be retiring /usr/bin/python and python2 packages are no longer being updated.

  2. Roland Haas

    Would be best if we can figure out what Debian / Ubuntu’s plans are. /usr/bin/python2 is still fine, just /usr/bin/python is no good anymore. If possible we should try and avoid the situation we had with gcc/gfortran-10 where things broke just after the release.

    Otherwise, yes delaying might well be feasible though we may have to comb our python scripts eg GW150914.rpar for #!/usr/bin/env python or similar in the hashbang line.

  3. William Gabella

    I agreed to pull and review, test as well as I can. Some kind of test suite would be nice.

    See Steve’s other pull request on the Python2 version with the --test switch on “sim” which will be changed to --dryrun . Might be a nice way to test sim over a broad range of options. See tickets #2482 and #2483.

    Zach shared a Python3 “lint” er at https://lgtm.com/projects/b/simfactory/simfactory2/?mode=list

    which as of now shows 4 errors, 27 warnings, 161 recommendations. Overall code quality “D” 🙂 Unclear to me whether this is the Steve Python3 code or the current Python2 code.

    Also our current Simfactory is officially Simfactory2; that does not mean Python2. There is a moribund project Simfactory3 out there.

  4. Log in to comment