Announcement

Collapse
No announcement yet.

Python 3 Is Close To Becoming The Default In Fedora 22

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Python 3 Is Close To Becoming The Default In Fedora 22

    Phoronix: Python 3 Is Close To Becoming The Default In Fedora 22

    For Python stakeholders using Fedora, the Fedora 22 release is preparing to ship Python 3 as the one and only Python implementation on the installation media...

    http://www.phoronix.com/scan.php?pag...ython-3-Status

  • #2
    About time.

    Comment


    • #3
      Sweet, hope Debian and Ubuntu follows suit.

      If you have old Python 2 code, port it to Python 3 with 2to3.

      https://docs.python.org/2/library/2to3.html
      http://python3porting.com/2to3.html

      Comment


      • #4
        Originally posted by uid313 View Post
        Sweet, hope Debian and Ubuntu follows suit.

        If you have old Python 2 code, port it to Python 3 with 2to3.

        https://docs.python.org/2/library/2to3.html
        http://python3porting.com/2to3.html

        Why? Python 2.7 is still very widely uselly and supported. Most of professional development are in Python 2.7. e.g OpenStack. Google App engine only support python 2.7. Django start to support to python 3 in 2013... And if you start to develop on python 3 you have distros with python 3.2, 3.3, 3.4 and when the update come you have to move again you old code to the new version... so not really interested right now on python 3.x. And we lacked of mysql connector for windows for a very long time... so not thanks...

        Comment


        • #5
          Originally posted by uid313 View Post
          Sweet, hope Debian and Ubuntu follows suit.

          If you have old Python 2 code, port it to Python 3 with 2to3.

          Why? Python 2.7 is still very widely uselly and supported. Most of professional development are in Python 2.7. e.g OpenStack. Google App engine only support python 2.7. Django start to support to python 3 in 2013... And if you start to develop on python 3 you have distros with python 3.2, 3.3, 3.4 and when the update come you have to move again you old code to the new version... so not really interested right now on python 3.x. And we lacked of mysql connector for windows for a very long time... so not thanks...

          Comment


          • #6
            Originally posted by cocklover View Post
            Why? Python 2.7 is still very widely uselly and supported. Most of professional development are in Python 2.7. e.g OpenStack. Google App engine only support python 2.7. Django start to support to python 3 in 2013... And if you start to develop on python 3 you have distros with python 3.2, 3.3, 3.4 and when the update come you have to move again you old code to the new version... so not really interested right now on python 3.x. And we lacked of mysql connector for windows for a very long time... so not thanks...
            ,

            The jump from python2 to python3 is in my eyes a bit more problematic then the jump from 3.3 to 3.4.
            A lot was changed between 2 and 3 (hence the new major number) especially in reagards to how strings are handled.

            While porting my code to python3 I found so many possible bugs in my python2 code due to improper encoding handling which I just had not seen before.
            SInce then I always try to write my code in python 3 first and then port it to python 2 if needed. Makes things a lot easier from my point of view.

            Comment


            • #7
              Originally posted by cocklover View Post
              And if you start to develop on python 3 you have distros with python 3.2, 3.3, 3.4 and when the update come you have to move again you old code to the new version...
              Saying that means that you didn't understood the problem: Python 3 breaks backwards compatibility with Python 2. The reason is that a lot of things in the language got crufty, so the team decided to clean it up. Python 3.2, 3.3, and so on are fully backwards compatible with Python 3. Python 2.7 will keep security updates for several years, but won't have new features.

              Comment


              • #8
                Originally posted by cocklover View Post
                Why? Python 2.7 is still very widely uselly and supported. Most of professional development are in Python 2.7. e.g OpenStack. Google App engine only support python 2.7. Django start to support to python 3 in 2013... And if you start to develop on python 3 you have distros with python 3.2, 3.3, 3.4 and when the update come you have to move again you old code to the new version... so not really interested right now on python 3.x. And we lacked of mysql connector for windows for a very long time... so not thanks...
                Based on my experience, most libraries have moved on and are now properly compatible with python 3. Anything that isn't compatible is some sort of niche that is too complicated to port over. However, I have written a roughly 3000 line program in python 2 and managed to convert it into python 3 while only changing a total of maybe 30 lines of code.

                Also, there are several MySQL libraries for python 3.x. I would be surprised if any were explicitly incompatible with Windows.

                As others have said, python 3.x is pretty much backward compatible with all of python 3. The way I see it, if you CAN upgrade, do it. Python 3 is taking so long to be adopted because people don't want to spend a few hours just making small tweaks in their code.

                Comment


                • #9
                  Originally posted by pininety View Post
                  ,

                  The jump from python2 to python3 is in my eyes a bit more problematic then the jump from 3.3 to 3.4.
                  A lot was changed between 2 and 3 (hence the new major number) especially in reagards to how strings are handled.

                  While porting my code to python3 I found so many possible bugs in my python2 code due to improper encoding handling which I just had not seen before.
                  SInce then I always try to write my code in python 3 first and then port it to python 2 if needed. Makes things a lot easier from my point of view.
                  Linters may also make life easier

                  Comment


                  • #10
                    I'll be worth it

                    Switching to python 3 is taking much longer than expected but I think in the long term the clean-up in the 2.x -> 3.x transition will be worth it.

                    I specially like:
                    - unicode strings
                    - strings vs data separation
                    - new division behaviour

                    Comment

                    Working...
                    X