Announcement

Collapse
No announcement yet.

Ubuntu 20.04 LTS Continuing To Work On Python 2 Removal

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

  • Ubuntu 20.04 LTS Continuing To Work On Python 2 Removal

    Phoronix: Ubuntu 20.04 LTS Continuing To Work On Python 2 Removal

    The goal for Ubuntu 20.04 is to ship with Python 2 removed since Py2 will be end-of-life after the after the start of the year and this next Ubuntu Linux release is a Long-Term Support release, but there still are many Python 2 depending packages left currently in Debian unstable and Ubuntu's "Focal Fossa" archive...

    http://www.phoronix.com/scan.php?pag...tinue-Py2-Drop

  • #2
    You use py2to3 to help convert your code base from Python 2 to Python 3. 🐍
    It should be relatively easy.
    Python 3 is much better and handles Unicode much better than Python 2.

    Comment


    • #3
      Originally posted by uid313 View Post
      You use py2to3 to help convert your code base from Python 2 to Python 3. 🐍
      It should be relatively easy.
      Well, calibre, bleachbit etc. will be glad to hear that! :-)

      In some cases, it's not easy, or at least it's lots of tedious work in some cases. Sometimes, dependencies are not available for python 2, like pygtk. Anyway, I'm glad that python2 is finally going away. I hope they succeed and can rip python2 out of the repositories in coming months. If you need calibre, install a snap/flatpak/whatever or bribe developers to finally port to python3 after all those years.

      My system still has python2 installed. That's because npm depends on node-gyp, which depends on gyp, which has not been updated to work with python3 yet in Ubuntu and Debian. The upstream node-gyp repository contains a bundled gyp copy which apparently supports python3, and the upstream "original" google chrome/chromium gyp repository also mentions python3 support in recent commits, so I hope they will update the gyp or node-gyp package to drop the python2 dependency in time for Ubuntu 20.04.

      Comment


      • #4
        Originally posted by Isedonde View Post
        In some cases, it's not easy, or at least it's lots of tedious work in some cases. Sometimes, dependencies are not available for python 2, like pygtk. Anyway, I'm glad that python2 is finally going away. I hope they succeed and can rip python2 out of the repositories in coming months. If you need calibre, install a snap/flatpak/whatever or bribe developers to finally port to python3 after all those years.
        Ah, yes with GTK you might need to rewrite it using GTK3 over GObject Introspection (GI).

        Comment


        • #5
          Meanwhile on arch...
          Code:
          :: removing python2 breaks dependency 'python2' required by apitrace
          :: removing python2 breaks dependency 'python2' required by asciidoc
          :: removing python2 breaks dependency 'python2' required by bzr
          :: removing python2 breaks dependency 'python2' required by gconf
          :: removing python2 breaks dependency 'python2' required by lib32-apitrace
          :: removing python2 breaks dependency 'python2' required by libkate
          :: removing python2 breaks dependency 'python2' required by libvolk
          :: removing python2 breaks dependency 'python2' required by mercurial
          :: removing python2 breaks dependency 'python2' required by pahole-git
          :: removing python2 breaks dependency 'python2' required by python2-appdirs
          :: removing python2 breaks dependency 'python2' required by python2-asn1crypto
          :: removing python2 breaks dependency 'python2' required by python2-attrs
          :: removing python2 breaks dependency 'python2' required by python2-cairo
          :: removing python2 breaks dependency 'python2' required by python2-click
          :: removing python2 breaks dependency 'python2' required by python2-constantly
          :: removing python2 breaks dependency 'python2' required by python2-dbus
          :: removing python2 breaks dependency 'python2' required by python2-enum34
          :: removing python2 breaks dependency 'python2' required by python2-gobject2
          :: removing python2 breaks dependency 'python2' required by python2-idna
          :: removing python2 breaks dependency 'python2' required by python2-ipaddress
          :: removing python2 breaks dependency 'python2' required by python2-jedi
          :: removing python2 breaks dependency 'python2' required by python2-numpy
          :: removing python2 breaks dependency 'python2' required by python2-parso
          :: removing python2 breaks dependency 'python2' required by python2-ply
          :: removing python2 breaks dependency 'python2' required by python2-pyopenssl
          :: removing python2 breaks dependency 'python2' required by python2-pyparsing
          :: removing python2 breaks dependency 'python2' required by python2-six
          :: removing python2 breaks dependency 'python2' required by python2-wxpython3
          :: removing python2 breaks dependency 'python2' required by python2-xdg
          :: removing python2 breaks dependency 'python2' required by python2-zope-interface
          One day hopefully.

          Comment


          • #6
            Py2 will be end-of-life after the after the
            Michael it's a typo.

            Comment


            • #7

              rdiff-backup
              cuetools
              calibre
              freecad
              gimp
              inkscape

              Are what I'm using that depend on python2.
              I should check upstream...
              looks like it's still a WIP in Fedora https://fedoraproject.org/wiki/Final...witchtoPython3

              Comment


              • #8
                Originally posted by uid313 View Post
                You use py2to3 to help convert your code base from Python 2 to Python 3. 🐍
                It should be relatively easy.
                Python 3 is much better and handles Unicode much better than Python 2.
                That is trivial for a 100 line script, there are big, huge, gigantic projects out there built on top of Python2 where this is not even possible without incurring in major rewrites.

                My software all runs on both P2 and P3, you can certainly do that, but it should have been avoided at all costs.

                Python3 should have had a simple flag to run P2 software unmodified from day one.

                The P2 to P3 debacle echoes the even bigger disaster that it is IPv4 to IPv6, I mention it because the IPv6 chaps deliberately sabotaged all efforts to make it backwards compatible, "It's just better".

                I keep wondering what is the point of languages like Python which promise ease of maintenance just to throw that ease of maintenance to the bin a couple of years later by forcing people to rewrite when a new mayor version comes out.

                Comment


                • #9
                  Originally posted by AsuMagic View Post
                  Meanwhile on arch...
                  Code:
                  :: removing python2 breaks dependency 'python2' required by apitrace
                  :: removing python2 breaks dependency 'python2' required by asciidoc
                  :: removing python2 breaks dependency 'python2' required by bzr
                  :: removing python2 breaks dependency 'python2' required by gconf
                  :: removing python2 breaks dependency 'python2' required by lib32-apitrace
                  :: removing python2 breaks dependency 'python2' required by libkate
                  :: removing python2 breaks dependency 'python2' required by libvolk
                  :: removing python2 breaks dependency 'python2' required by mercurial
                  :: removing python2 breaks dependency 'python2' required by pahole-git
                  :: removing python2 breaks dependency 'python2' required by python2-appdirs
                  :: removing python2 breaks dependency 'python2' required by python2-asn1crypto
                  :: removing python2 breaks dependency 'python2' required by python2-attrs
                  :: removing python2 breaks dependency 'python2' required by python2-cairo
                  :: removing python2 breaks dependency 'python2' required by python2-click
                  :: removing python2 breaks dependency 'python2' required by python2-constantly
                  :: removing python2 breaks dependency 'python2' required by python2-dbus
                  :: removing python2 breaks dependency 'python2' required by python2-enum34
                  :: removing python2 breaks dependency 'python2' required by python2-gobject2
                  :: removing python2 breaks dependency 'python2' required by python2-idna
                  :: removing python2 breaks dependency 'python2' required by python2-ipaddress
                  :: removing python2 breaks dependency 'python2' required by python2-jedi
                  :: removing python2 breaks dependency 'python2' required by python2-numpy
                  :: removing python2 breaks dependency 'python2' required by python2-parso
                  :: removing python2 breaks dependency 'python2' required by python2-ply
                  :: removing python2 breaks dependency 'python2' required by python2-pyopenssl
                  :: removing python2 breaks dependency 'python2' required by python2-pyparsing
                  :: removing python2 breaks dependency 'python2' required by python2-six
                  :: removing python2 breaks dependency 'python2' required by python2-wxpython3
                  :: removing python2 breaks dependency 'python2' required by python2-xdg
                  :: removing python2 breaks dependency 'python2' required by python2-zope-interface
                  One day hopefully.
                  Most of those rev deps are python2 packages, not really required once you get rid of Python 2. You should seriously consider git instead of mercurial and bzr.

                  Comment


                  • #10
                    Originally posted by JPFSanders View Post

                    That is trivial for a 100 line script, there are big, huge, gigantic projects out there built on top of Python2 where this is not even possible without incurring in major rewrites.

                    My software all runs on both P2 and P3, you can certainly do that, but it should have been avoided at all costs.

                    Python3 should have had a simple flag to run P2 software unmodified from day one.

                    The P2 to P3 debacle echoes the even bigger disaster that it is IPv4 to IPv6, I mention it because the IPv6 chaps deliberately sabotaged all efforts to make it backwards compatible, "It's just better".

                    I keep wondering what is the point of languages like Python which promise ease of maintenance just to throw that ease of maintenance to the bin a couple of years later by forcing people to rewrite when a new mayor version comes out.
                    Python 3 has been around for over ten years now. And throughout that time, they have continued to support Python 2. I think that's pretty reasonable, and quite enough time for major projects to adapt their code before support is ended. Your suggestion of adding a flag for Python 3 to run Python 2 code would just make it more bloated and complex to maintain.

                    As for IPv6, the transition has been slow, but at this point it's pretty widespread. All of the cell phone networks support it and most major ISPs support it. All we need now is for a few major websites to go IPv6-only. That would give a good kick in the pants to any ISPs that still don't provide it. I don't think there is any rush to get rid of IPv4 completely, but ISPs could start throttling that traffic to encourage more websites to provide IPv6 access.

                    Comment

                    Working...
                    X