• dinckel@lemmy.world
    link
    fedilink
    arrow-up
    25
    ·
    5 days ago

    It’s a really bold claim. Every time a new package manager and/or dependency resolver comes around, we have the exact same headline

    • BitSound@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      5 days ago

      It is a bold claim, but based on their success with ruff, I’m optimistic that it might pan out.

      • monogram@feddit.nl
        link
        fedilink
        English
        arrow-up
        9
        ·
        5 days ago

        pipx, poetry, pipsi, fades, pae, pactivate, pyenv, virtualenv, pipenv

        Let’s hope this next one will be the true standard.

          • dallen@programming.dev
            link
            fedilink
            arrow-up
            6
            ·
            5 days ago

            I’ve been mostly a poetry guy but have tested out uv a bit lately. Two main advantages I see are being able to install Python (I relied on pyenv before) and it’s waaay faster at solving/installing dependencies.

            • sugar_in_your_tea@sh.itjust.works
              link
              fedilink
              arrow-up
              2
              ·
              5 days ago

              Yeah, it certainly looks nice, but my problems are:

              • everything runs in a docker container locally, so I don’t think the caching is going to be a huge win
              • we have a half-dozen teams and a dozen repositories or so, across three time zones, so big changes require a fair amount of effort
              • we just got through porting to poetry to split into dependency groups, and going back to not having that is a tough sell

              So for me, it needs to at least have feature parity w/ poetry to seriously consider.

              • Eager Eagle@lemmy.world
                link
                fedilink
                English
                arrow-up
                3
                ·
                edit-2
                5 days ago

                uv is still faster with a cold cache

                and uv does have dep groups

                about the second problem, there’s an issue open on writing a migration guide, but migrating manually is not too difficult.

                • sugar_in_your_tea@sh.itjust.works
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  4 days ago

                  I’m not really worried about the migration work, from what I can tell it’s basically just moving a few things around. I’m more worried about losing features the team likes largely for performance reasons.

                  Our primary use cases are:

                  • dev tools - standardize versions of tools like black, pylint, etc; not necessary if we move to ruff, we’ll just standardize on a version of that (like we do with poetry today)
                  • tests - extra deps for CI/CD for things like coverage reports

                  I like the syntax poetry has, but I’d be willing to use something else, like in PEP 735.

                  One thing we also need is a way to define additional package repos since we use an internal repo. I didn’t see that called out in the PEP, and I haven’t looked at uv enough to know what their plan is, but this issue seems to be intended to fix it. We specify a specific repo for a handful of packages in each project, and we need that to work as well.

                  I’m currently looking to use ruff to replace some of our dev tools, and I’ll look back at uv in another release or two to see what the progress is on our blockers.

  • ertai@programming.dev
    link
    fedilink
    arrow-up
    20
    arrow-down
    1
    ·
    edit-2
    5 days ago

    Yet another python packager............... insane that such a popular language still doesn’t have this basic problem solved.

    • ertai@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      3 days ago

      Glad I use arch btw, pacman manages my python packages so I don’t have to deal with all this mess.

    • CodeMonkey@programming.dev
      link
      fedilink
      arrow-up
      4
      arrow-down
      2
      ·
      4 days ago

      pip is a perfectly usable package manager and is included in most python distributions now. Is it perfect? No, but it is good enough for every team I have been on.

      • uthredii@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        24 hours ago

        Putting aside the speed uv has a bunch of features that usually require 2-4 separate tools. These tools are very popular but not very well liked. The fact these tools are so popular proves that pip is not sufficient for many use cases. Other languages have a single tool (e.g. cargo) that are very well liked.

      • Eager Eagle@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        4 days ago

        it’s usable, yet it doesn’t attempt to solve a a third of the problems uv, poetry, and pdm address.

        it’s also not hard to end up with a broken env with pip.

      • Moc@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        4 days ago

        Except that it’s slower than uv and therefore strictly worse for build processes

    • sum_yung_gai@lemm.ee
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      4 days ago

      I use poetry and it works really well. I would consider it solved but that doesn’t mean there isn’t the possibility of a better solution.

    • sugar_in_your_tea@sh.itjust.works
      link
      fedilink
      arrow-up
      5
      ·
      5 days ago

      Looks like it has basic support:

      • required-python = "..."
      • dependencies = [ ... ]

      Once it gets dependency groups, I’ll try it out. I’m currently using poetry, which works, but I’m always interested in better perf.

      • Eager Eagle@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        5 days ago

        it already has dep groups; e.g.

        uv add --optional staging pytest

        then

        uv sync --extra staging

        to install / uninstall packages accordingly.

        They have a --dev shorthand for dev dependencies, but it seems the dependency group PEP is not final, so there isn’t a standardized way of doing this yet.

        • beeng@discuss.tchncs.de
          link
          fedilink
          arrow-up
          3
          ·
          5 days ago

          Private PyPI too?

          We’re coming from poetry but it’s slow and needs its own .venv, so a UV binary would be very nice.

        • sugar_in_your_tea@sh.itjust.works
          link
          fedilink
          arrow-up
          1
          ·
          4 days ago

          Oh cool, I’ll definitely look into that.

          And honestly, the one I need more is a test group for CI, for things like coverage reporting and whatnot. If I can get that and if having multiple package indexes works properly (i.e. it can check my private repo first, and then pypi), I can probably port our projects to uv, at which point it’s an internal discussion instead of a technical one.