• @ertai@programming.dev
    link
    fedilink
    13
    edit-2
    1 day ago

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

    • @CodeMonkey@programming.dev
      link
      fedilink
      15 hours 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.

      • Juanlu
        link
        fedilink
        45 hours ago

        @CodeMonkey @ertai No it is not perfectly usable for all people, all projects, all situations. uv definitely gets much closer to that.

    • @sum_yung_gai@lemm.ee
      link
      fedilink
      413 hours 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.

  • dinckel
    link
    fedilink
    181 day 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

      • @monogram@feddit.nl
        link
        fedilink
        English
        91 day 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
            61 day 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.

            • 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
                link
                fedilink
                English
                2
                edit-2
                22 hours 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.

                • 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.

      • @gigachad@sh.itjust.works
        link
        fedilink
        91 day ago

        We do geodata science and rely on some pretty specific C++ libraries that are only distributed via conda. While on unix-based systems it’s possible to get some of them from other channels or even building them from source, we mostly have Windows machines in production where we are not that flexible. Docker is unfortunately no solution due to security concerns.

        If you are asking why I hate it: It’s bloated, uses more space than needed and it’s rare I can reproduce an environment from the environment file without running into errors. Using it feels unintuitive, I still google command after years. It was very slow until recently, when the libmamba solver was finally integrated. Last but not least licensing is a pain in the ass.

        • @rutrumA
          link
          fedilink
          English
          16 hours ago

          I’ve been using micromamba/mamba and not had solving issues like I did with conda. Im glad conda integrated libmamba.

          Question: why were docker containers deemed security risks?

        • Eager Eagle
          link
          fedilink
          English
          222 hours ago

          I share the same frustration trying to replicate an environment. I’m glad I can avoid it these days, the community needs a way out of the conda lock-in.

        • db0
          link
          fedilink
          21 day ago

          Interesting. We use conda via micromamba for my own project, as it makes the install for end-users much easier when they can just run a shell script, to install python, cuda, and all the dependencies needed.

    • Eager Eagle
      link
      fedilink
      English
      322 hours ago

      they do, just use project management commands like uv + { add, remove, sync, lock, run }

    • 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
        link
        fedilink
        English
        3
        edit-2
        22 hours 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.