3 ms·
Python 2 and Python 3 are distinct languages with a lot of commonalities. It's a difficult port that cannot be automated.
by lidHanteyk 7y ago
Python 2 and Python 3 are distinct languages with a lot of commonalities. It's a difficult port that cannot be automated.
- kevin_thibedeau 7y agoIt's easy to gradually upgrade Py2 code. Start introducing the future imports. Unicode handling is the only tricky one (though not so bad when the codecs module is consistently used). Then start running files through 2to3 and making the code forward compatible. This can be done over a long time span while maintaining full 2.7 compatibility.
- marmada 7y agoThese types of comments are confusing. The developer of Mercurial has stated that it took/is taking them several years to port to Python 3. I'm inclined to believe them compared to some random stranger who asserts that it should be easy for Mercurial to be ported to Python 3. Unless you were saying that most other/non-Mercurial programs are easy to port to Python 3, which could be true.
- lidHanteyk 7y agoHave you ever carried an application using Django, or Twisted, or Zope, through this process? It is not easy. Many different libraries with various incompatibilities and versions can lead to real difficulties merely in upgrading for security releases. Additionally, unless one is containerized, one must contend with the underlying platform's issues, as the platform must also switch from Python 2 to Python 3. I understand your opinion: It is the party line. But it doesn't actually help much when the process as described will take years and people only have months, and this is further worsened by the fact that PSF did not have to deprecate the entire Python 2 ecosystem in order to stop supporting CPython 2.7.
- kevin_thibedeau 7y agoThe is more the fault of certain libraries playing non-Pythonic games with monkeypatches and magic code on import. Mercurial is not burdened by those troubles. The writing was on the wall ten years ago. Failure to take action is not Python's fault.