I think this seems like something we're going to need to do sooner rather than later. I also made some changes recently which made our scons scripts more compatible with python 3, but I don't think I fixed all the issues entirely. I don't remember what issues were still there, but it should be easy enough to re-discover them. Ideally we'd use python 3 in scons as well.
Gabe On Fri, Jan 17, 2020 at 6:13 AM Andreas Sandberg <andreas.sandb...@arm.com> wrote: > Hi Everyone, > > As some of you might have seen, all development of Python 2.7 will cease > in April this year [1]. What that means in practice is that the default > version of Python in gem5 will no longer be supported by the Python team > after that point. Distributions will likely ship Python 2.7 for a few more > years though, but the default version has already switched to Python 3 in > some cases. > > About a year ago, I posted a series of patches to make gem5 run in Python > 3. There is still one outstanding patch [2] that hasn't been merged since > the Python 2/3 meta-class compatibility code triggered some assertions that > I had to turn into warnings. If you want to try gem5 with Python 3, all you > have to do is to apply that patch and tell scons to use Python 3 instead of > Python 2 (set PYHTHON_CONFIG=python3-config). > > I would suggest that we plan to phase out Python 2 completely sometime > this year. To reduce disruption, I would suggest that we plan for at least > one release that supports both Python 2 and 3, but defaults to Python 3. > After that, I would suggest that we drop Python 2.7 support entirely since > that would allow us to get rid of some compatibility code (e.g., the six > dependency) and re-enable the assertions disabled by [2]. Is this desirable > for the rest of the community? Is the timeline too aggressive / not > aggressive enough? > > If we decide to switch to Python 3 by default, we need to decide the > minimum supported Python 3 version. IIRC, the current implementation works > with Python 3.4, but we could probably mandate a newer version. Ubuntu > 16.04 supports 3.5 and 18.04 comes with version 3.6. RHEL/CentOS only > started to ship Python 3.6 in version 7 and doesn't support Python 3 at all > before release 7. Requiring Python 3.5 or even 3.6 seems pretty safe to me. > > Cheers, > Andreas > > [1] http://pyfound.blogspot.com/2019/12/python-2-sunset.html > [2] <http://pyfound.blogspot.com/2019/12/python-2-sunset.html> > https://gem5-review.googlesource.com/c/public/gem5/+/15982 > > IMPORTANT NOTICE: The contents of this email and any attachments are > confidential and may also be privileged. If you are not the intended > recipient, please notify the sender immediately and do not disclose the > contents to any other person, use it for any purpose, or store or copy the > information in any medium. Thank you. IMPORTANT NOTICE: The contents of > this email and any attachments are confidential and may also be privileged. > If you are not the intended recipient, please notify the sender immediately > and do not disclose the contents to any other person, use it for any > purpose, or store or copy the information in any medium. Thank you. > _______________________________________________ > gem5-dev mailing list > gem5-dev@gem5.org > http://m5sim.org/mailman/listinfo/gem5-dev _______________________________________________ gem5-dev mailing list gem5-dev@gem5.org http://m5sim.org/mailman/listinfo/gem5-dev