• RedditReject@lemmy.world
    link
    fedilink
    arrow-up
    15
    ·
    2 years ago

    Not sure why it is a big deal for most things. I was a 2.7 die hard and was forced to move to 3.x a few years ago. Had to rewrite a bunch of crap at first but once it was done it’s been a lot better than I thought it was going to be at first.

    • Narann@lemmy.world
      link
      fedilink
      English
      arrow-up
      9
      ·
      2 years ago

      Not sure why it is a big deal for most things.

      Close source libraries written by third party contractors in non web/internet/research related domains.

      What it means is that you will always have a small portion of Python devs that will stay on Python 2.

      Even if you fork it and rename it to Snake 2, you will always have devs working on a language named Python 2.

      • RedditReject@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        2 years ago

        I get that. My job is mostly writing Python scripts to keep an old Fortran based framework going, so I cringe when people get married into a language like this. I feel that all code should be adaptable and be able to absorb upgrades and changes. But I certainly understand. From my perspective if they were to rework my old Fortran code, it would take them at least a year or more to do it well. Most companies don’t want to spend that sort of effort.

    • icedterminal@lemmy.world
      link
      fedilink
      English
      arrow-up
      8
      ·
      2 years ago

      Both. There are many breaking changes that can make your code completely incompatible. Some people won’t bother to port their code. Others could be using an obscure or niche library that hasn’t been updated for 3 and can’t port their code.

      • Kogasa@programming.dev
        link
        fedilink
        arrow-up
        4
        ·
        2 years ago

        Third category, software provided as part of an ancient service contract that nobody is allowed to touch, even though the service partner stopped offering support for this particular software years ago. Ask me how I know

    • dallen@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      At the old job I was using IronPython (2.7) to write Grasshopper plug-ins in the Rhino CAD software. Luckily, it was mostly responsible for kicking off Python3 and Go subprocesses.

      Now, the worst I’m stuck with is 3.8 for one of our repos using PyTorch.

  • ALERT@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    1
    ·
    2 years ago

    yeah. my pain exactly. the only thing that keeps me well is 3.12 in my personal projects.

  • Gamma@beehaw.org
    link
    fedilink
    English
    arrow-up
    6
    ·
    2 years ago

    I had no idea, never having to deal with library updates must be nice 😆

  • rockSlayer@lemmy.world
    link
    fedilink
    arrow-up
    6
    arrow-down
    1
    ·
    2 years ago

    At this point Python 2.7 should be forked into a new language. They could call it something like Daudin, after the person who coined the word Python for the genus of nonvenomous snakes

    • o11c@programming.dev
      link
      fedilink
      arrow-up
      2
      arrow-down
      3
      ·
      2 years ago

      Python 2 had one mostly-working str class, and a mostly-broken unicode class.

      Python 3, for some reason, got rid of the one that mostly worked, leaving no replacement. The closest you can get is to spam surrogateescape everywhere, which is both incorrect and has significant performance cost - and that still leaves several APIs unavailable.

      Simply removing str indexing would’ve fixed the common user mistake if that was really desirable. It’s not like unicode indexing is meaningful either, and now large amounts of historical data can no longer be accessed from Python.

        • o11c@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          It’s because unicode was really broken, and a lot of the obvious breakage was when people mixed the two. So they did fix some of the obvious breakage, but they left a lot of the subtle breakage (in addition to breaking a lot of existing correct code, and introducing a completely nonsensical bytes class).