On Fri, Jan 17, 2020 at 9:42 AM Andreas Sandberg <[email protected]> wrote:
> Dropping support in 20.1 or 20.2 sounds good to me. In practice, that > means we can drop support on the development branch as soon as the > stable branch has been released. Are you suggesting that we aim to make > Python 3 the default, but keep support for 2.7, in gem5 20 when it is > released in April? > That's what I'm proposing. We'll have to investigate what's left to do before we can make Python3 default and make sure we have the resources before committing, though :). > As for the Python version, requiring 3.5 shouldn't be controversial at > all since all major distros that are still supported and support Python > 3 ship with 3.5 or newer. I wouldn't mind going straight to 3.6, but it > might be controversial since Ubuntu 16.04 ships with 3.5 and will be > supported until early 2021. > I quickly looked up what we'd be missing if we went with 3.5 instead of 3.6. See https://docs.python.org/3/whatsnew/3.6.html. There are two features there that I think we would use heavily if we went to 3.6. 1) Type annotation syntax for variables. I found this pretty important when I was adding type annotations one of our python libraries recently. 2) f-strings. To me, this is a huge win for us if we can use f-strings instead of `.format`. I would vote for going to 3.6 just for this! When implementing a new gem5 python library (something that's planning for summer 2020), it would be best to be forward looking to require at least python 3.6 (released in 2016!). I would rather not have to bump the minimum required python version again anytime soon :). I don't see anything in Python 3.7 or 3.8 that is a compelling reason to make that our minimum version anytime in the next few years. > > Cheers, > Andreas > > On 17/01/2020 16:19, Jason Lowe-Power wrote: > > Yes, this is very important. > > > > I think we could go ahead and make this a goal for gem5 20 to be released > > in April. We can support both in gem5-20.0 and in gem5-20.1 or 20.2 drop > > support for 2.7. > > > > Additionally, I'd like to see us require at least Python 3.5 so we can > > start using python type annotations: > > https://www.python.org/dev/peps/pep-0484/. > > > > Cheers, > > Jason > > > > On Fri, Jan 17, 2020 at 8:08 AM Gabe Black <[email protected]> wrote: > > > >> 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 < > [email protected] > >> 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 > >>> [email protected] > >>> http://m5sim.org/mailman/listinfo/gem5-dev > >> _______________________________________________ > >> gem5-dev mailing list > >> [email protected] > >> http://m5sim.org/mailman/listinfo/gem5-dev > > _______________________________________________ > > gem5-dev mailing list > > [email protected] > > http://m5sim.org/mailman/listinfo/gem5-dev > > > 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 [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
