Re:Pip has dropped support for Python 2
by musicale on Sunday January 24, 2021 @05:13PM
(#25896705)
> How would you have handled the string/bytes split in a way that’s backwards compatible? Or the removal of old-style classes?
I'm not sure it's the best way to handle it, but I would have been fine with:
from __python2__ import *
for full backward compatibility; or, more explicitly:
from __python2__ import ascii_strings, old_style_classes, print_statement, ...
As the parent poster mentions, several other popular languages and systems (C++, Java, etc.) have done a pretty decent job preserving backward compatibility, for good reason: it saves millions of hours of human effort. It's embarrassing and disappointing that Python simply blew it with the Python 2 to 3 transition.
Maybe we could still evolve pypi to support a compatibility layer to allow easy mixing of python2 and python3 code, but I get the feeling that Python 3 has poisoned the well.
I'm not sure it's the best way to handle it, but I would have been fine with:
for full backward compatibility; or, more explicitly: As the parent poster mentions, several other popular languages and systems (C++, Java, etc.) have done a pretty decent job preserving backward compatibility, for good reason: it saves millions of hours of human effort. It's embarrassing and disappointing that Python simply blew it with the Python 2 to 3 transition.Maybe we could still evolve pypi to support a compatibility layer to allow easy mixing of python2 and python3 code, but I get the feeling that Python 3 has poisoned the well.