Re: Saying bye bye to Python 2
On 2020-01-11, Gunnar Þór Magnússon wrote: >> I thought that upgrading is not that simple. > If you have Python 2 code that deals with a lot of text in byte > form, and it's kind of vague where you convert from bytes to > strings, you may have a bad time. > > Otherwise, it may not be that bad. I ported around 500k lines of > Python 2 to 3 this year, and it went smoothly. That's been my experience: unless you use raw bytes a lot, I find that porting apps from 2 to 3 isn't difficult at all. You sometimes have to tweak text I/O stuff a little to fix encoding issues. Porting apps that use bytes is more work, but if you're abandoning 2.x support, usually not too bad. The real headache is trying to keep a "byte-centric" application backwards compatible so that it will run under 2.x or 3.x. I used to try to keep things backwards compatible, but have recently started to abandon 2.x support in my (mostly internal) apps. -- Grant Edwards grant.b.edwardsYow! I represent a at sardine!! gmail.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Saying bye bye to Python 2
On 1/11/2020 7:22 AM, Thomas Jollans wrote: Though in a shock announcement a few weeks ago the end of Python 2 was delayed AGAIN (this time only by a few months, but still) https://pyfound.blogspot.com/2019/12/python-2-sunset.html Not really. The only thing delayed was the final release,2.7.18, so it could be done during PyCon. The end of core developer maintenance occurred on schedule. "Effective January 1, 2020, no new bug reports, fixes, or changes will be made to Python 2." Any further changes should be cleanup patches by or with the approval of the release manager, preparing for the release candidate and then the final release. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list
Re: Saying bye bye to Python 2
On Sun, Jan 12, 2020 at 4:50 AM Gunnar Þór Magnússon wrote: > > > I thought that upgrading is not that simple. > > It depends. > > If you have Python 2 code that deals with a lot of text in byte form, and > it's kind of vague where you convert from bytes to strings, you may have a > bad time. > It's always hard to port buggy code or underspecified code. If you have code written in some hypothetical language that doesn't distinguish properly between 16-bit ints and 64-bit floats, and has sloppy conversions between them and different semantics, then it would be a pain to port that to any other language. Ultimately, the cure is to figure out the programmer's original intention and implement that. > Otherwise, it may not be that bad. I ported around 500k lines of Python 2 to > 3 this year, and it went smoothly. The most valuable resource I found was > eevee's post on the subject: > Python Indeed. Especially if you're porting to a fairly recent Py3, chances are that most of the code will work just fine. There'll be just a few places where you have to manually figure things out, and for the rest, automated conversions like 2to3 will cover it. (And a lot of it doesn't even need automated conversion. There aren't actually THAT many things to change.) ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: Saying bye bye to Python 2
> I thought that upgrading is not that simple. It depends. If you have Python 2 code that deals with a lot of text in byte form, and it's kind of vague where you convert from bytes to strings, you may have a bad time. Otherwise, it may not be that bad. I ported around 500k lines of Python 2 to 3 this year, and it went smoothly. The most valuable resource I found was eevee's post on the subject: https://eev.ee/blog/2016/07/31/python-faq-how-do-i-port-to-python-3/ It talks about the most common tools and pitfalls. In particular, I found the future project to be very valuable. Best, G On Sat, Jan 11, 2020, at 00:16, tommy yama wrote: > As many know, python 2 was retired. > This means imminent migration to 3 will be a must ? > > I thought that upgrading is not that simple. > > > thanks ! > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Re: Saying bye bye to Python 2
On 11/01/2020 00:16, tommy yama wrote: As many know, python 2 was retired. This means imminent migration to 3 will be a must ? Upgrading to Python 3 has been a "bloody well should" for many, many years now. Though in a shock announcement a few weeks ago the end of Python 2 was delayed AGAIN (this time only by a few months, but still) https://pyfound.blogspot.com/2019/12/python-2-sunset.html I thought that upgrading is not that simple. thanks ! -- https://mail.python.org/mailman/listinfo/python-list
Re: Saying bye bye to Python 2
tommy yama : > As many know, python 2 was retired. > This means imminent migration to 3 will be a must ? Python 2 will have a lively retirement. It won't be dead before RHEL 7 is dead. According to https://access.redhat.com/support/policy/updates/errata the support dates for RHEL 7 are: End of Full Support: Aug 6, 2019 End of Maintenance Support 1: Aug 6, 2020. End of Maintenance Support 2: June 30, 2024. End of Extended Life-cycle Support: TBD End of Extended Life Phase: ongoing Last Minor Release: TBD Marko -- https://mail.python.org/mailman/listinfo/python-list
Re: Saying bye bye to Python 2
> > As many know, python 2 was retired. > This means imminent migration to 3 will be a must ? > Not if you don't change anything (update software or hardware). If it ain't broke, there's no need to fix it. OTOH, if your software, Python itself, or your operating system have security or other bugs, you may well have to update something. Even so, that may well not force a switch to Python 3. > I thought that upgrading is not that simple. > That depends. In my experience, str/bytes were the only frustrating bits. Other than that, the 2to3 tool does a pretty good job. Also, assuming you have a decent suite of unit tests, porting from 2 to 3 will be much more straightforward. Skip -- https://mail.python.org/mailman/listinfo/python-list
Saying bye bye to Python 2
As many know, python 2 was retired. This means imminent migration to 3 will be a must ? I thought that upgrading is not that simple. thanks ! -- https://mail.python.org/mailman/listinfo/python-list