3 ms·
That's not the way it worked. You couldn't migrate your code until your libraries had migrated. They didn't always want to migrate because their userbase was ge
by donor20 6y ago
That's not the way it worked. You couldn't migrate your code until your libraries had migrated. They didn't always want to migrate because their userbase was generally mostly on 2.
This is what worries me - the lack of understanding of how broken these backward compat breaking changes are. Mercurial, built on python, took 10 years of work to get to python 3 - for basically no reward (they just need bytes and unicode is not super relevant to them) as just one example of MANY.
Let me give you an example. in Python 2 you could use u'' for a unicode string. Perfect, I could update python 2 code to use this or b'' if I needed bytes so in the python 3 setting the right things could happen. The python developers literally TOOK THIS AWAY in python 3. So now, for no reason we can ever hope to understand, you couldn't write code that work work in 2 and 3 by using u'' and b''. This was the type of screw the developer in your face attitude that developers got.
Let's be clear, library folks would need to write code that worked for python 2 and 3 for a long time. And instead of making this easy or at least reasonable, the python developers went out of their way to basically screw folks over here.
Others will remember that the very reasonable formating approaches to bytes (yes, those are useful) was trashed in python 3, again for no seemingly good reason. % operator .format etc. WHY? I'm serious.
"You had 12 years of warning" - hey how about python follows some other languages. Make the update compelling so folks are excited to move. Think about things that will make it easier instead of just pulling all these silly stunts. You couldn't practically move initially. Something as simple as doing u'' in python 2 that would alias properly in 3 - was a no go.
This is what worries me about posts like yours, python developers have really no clue how stupid this type of backward compat breaking approach is if you have limited upside and go out of your way to make it hard to support both versions. It is critical that lesson be learned - but it seems hopeless.
Anyways, go and others I think are going to make a reasonable run at this sort of utility language space with I think some stronger efforts around backward compatability. I think the next backwards incompatible change in python (python 4?) will probably see a much bigger migration off python.
- joshuamorton 6y ago> They didn't always want to migrate because their userbase was generally mostly on 2. Yes, this doesn't change my argument. You had 12 years of warning. You couldn't migrate immediately, but you had 12 years of warning to plan your migration. > I think the next backwards incompatible change in python (python 4?) will probably see a much bigger migration off python. You aren't paying much attention to the python ecosystem then. I wouldn't expect a python3-like breaking change for another 10 years, if ever. > Mercurial, built on python, took 10 years of work to get to python 3 - for basically no reward (they just need bytes and unicode is not super relevant to them) as just one example of MANY. Mercurial took ~4.5 years to migrate, from April 2015 to November 2019. Mercurial also took a roundabout way of doing the migration that likely made it take longer (https://gregoryszorc.com/blog/2020/01/13/mercurial%27s-journey-to-and-reflections-on-python-3/ https://gregoryszorc.com/blog/2020/01/13/mercurial%27s-journ...) > The python developers literally TOOK THIS AWAY in python 3. And then readded in python 3.3, around 7 years ago. > . You couldn't practically move initially. Something as simple as doing u'' in python 2 that would alias properly in 3 - was a no go. I agree you couldn't migrate immediately! But you still had 12+ years of warning! I'll repeat myself: I expect most application code was migratedn in the last 2 years. But the maintainers of those applications had 10+ years to prepare for the migration of their application. This prep took many forms. For some it was nothing, for some it was helping dependencies migrate to 2/3 compat. For some it was planning the eventual migration. But every single one had more than a decade of warning.