Slashdot Mirror


It Will Take Fedora More Releases To Switch Off Python 2 (phoronix.com)

An anonymous reader quotes Phoronix: Finalizing Fedora's switch from Python 2 to Python 3 by default is still going to take several more Fedora release cycles and should be done by the 2020 date when Python 2 will be killed off upstream. While much of Fedora's Python code is now compatible with Py3, the /usr/bin/python still points to Python 2, various python-* packages still mean Python 2... The end game is to eventually get rid of Python 2 from Fedora but that is even further out.
Fedora is now gathering feedback on a Wiki page explaining the switch.

2 of 94 comments (clear)

  1. Re:add `python2` and deprecate `python` by KiloByte · · Score: 4, Interesting

    /usr/bin/python is not going to ever point to python3 in Debian, at least according to the maintainer. Unfortunately, there are distros which have done this step.

    Python 2 and Python 3 are similar but different languages, akin to Perl 5 and Perl 6. As they're not supposed to be compatible, changing the meaning of the hashbang is a recipe for disaster.

    --
    The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
  2. Re:PEP 394: /usr/bin/python should not be python3 by Anonymous Coward · · Score: 2, Interesting

    But I'm sick of python2 being around as long as it has. It needs to die...

    Really? Python 2 is simple and elegant. Python 3 is not.

    Examples:
    * Python 2 has polymorphic division: 5 / 2 = 2 and 5.0 / 2 = 2.5. In Python 3, you need to use two different division operators: // for integer division on / for float. If you want to support both integer and floating point division in your function, you can't do it python 3 (but you can in python 2 (polymorphic div)). This retarded design (// and / in py3) was done thanks to numpy developers.

    * Python 2 has simple ASCII strings and unicode strings as two different types. Python 3 merges them into one (utf-8). This causes a lot of difficulty to newbies and experienced developers who just want to use ascii without the complexities of unicode.