Is "uv" the FUTURE of Python package management?

Поділитися
Вставка
  • Опубліковано 14 лип 2024
  • Not satisfied with revolutionising the world of linting, the people behind Ruff are back once more to unleash "uv", Python's newest package manager, into the wild. (And I thought Ruff was a weird name...)
    0:00 - Intro
    1:15 - First impressions
    1:34 - Installing uv
    2:00 - Creating virtual environments
    3:32 - Performance test with google-api-python-client
    6:51 - --no-cache benchmark
    7:12 - Performance test in a development environment
    8:56 - Major difference between pip and uv
    12:40 - Outro
    -
    If you enjoy my content, consider supporting me on Patreon or becoming a member!
    patreon.carberra.xyz
    join.carberra.xyz
    If you need help with anything, feel free to join the Discord server:
    discord.carberra.xyz
    I get a lot of people asking, so here's my Visual Studio Code setup!
    • My Visual Studio Code ...
    -
    If you have any questions, don't hesitate to ask in the comments! I'll try and answer as soon as I can, providing someone else hasn't already done so.
    #python #coding #howto

КОМЕНТАРІ • 61

  • @Carberra
    @Carberra  4 місяці тому +12

    I've been told it's pronounced "yoo-vee" rather than "uvv". Not gonna lie, I was starting to get worried!

    • @eksortso
      @eksortso 4 місяці тому

      No worries there. Personally, when a command name ends with v, I'll say the start then say "vee," because I don't want to suppress the v sound when talking. Even if that makes venv sound like something sinister.

    • @JustLikeBuildingThings
      @JustLikeBuildingThings 4 місяці тому +2

      Alright uvv.

    • @coced
      @coced 4 місяці тому

      silly name ? silly prononciation !
      WE ARE THE PEOPLE

  • @TawaraboshiGenba
    @TawaraboshiGenba 4 місяці тому +14

    1. We have 8 different package managers for Python
    2. uv is here to supersede all of them
    3. We now have 9 package managers for Python

    • @Carberra
      @Carberra  4 місяці тому

      8?! I've only heard of 5 -- pip, pipx, pipenv, Poetry, and PDM (if we exclude uv) -- what are the others? (Not saying you're wrong, just curious.)

    • @legion_prex3650
      @legion_prex3650 4 місяці тому

      @@Carberra pip-tools is another one i like. oldie but goldie

    • @domenechj
      @domenechj 4 місяці тому

      @@Carberra What do you think about Pixi?

    • @Carberra
      @Carberra  4 місяці тому

      Oh yeah pip-tools of course. There's also pip-compile isn't there? I can't help but feel these three should've all just been part of pip.

    • @Carberra
      @Carberra  4 місяці тому

      Can't say I've ever heard of Pixi!

  • @chyldstudios
    @chyldstudios 4 місяці тому +9

    i believe it is pronounced "U.V." not "of".

  • @poorlymadeedits5911
    @poorlymadeedits5911 4 місяці тому +9

    I would love to have this replace pip. It's so much faster and has cleaner outputs

    • @Carberra
      @Carberra  4 місяці тому +3

      Honestly the TUX just makes it for me.

  • @Bwanshoom
    @Bwanshoom 4 місяці тому +5

    The Windows commands for installing are PowerShell: irm is an alias of the Invoke-RestMethod cmdlet and iex is an alias of Invoke-Expression

    • @Carberra
      @Carberra  4 місяці тому +1

      Aaah okay. Cheers for clearing that up!

  • @scaffus
    @scaffus 4 місяці тому +2

    That's impressive

  • @therealslimaddy
    @therealslimaddy 4 місяці тому +2

    I tried it. The dependency resolution/management is just out of this world.
    It’s still incomplete though, I’m looking forward towards this.

    • @Carberra
      @Carberra  4 місяці тому +1

      Yeah, will be interesting to see where it ends up!

  • @Murderbits
    @Murderbits 4 місяці тому +11

    The interface improvement is interesting, but the speed not so much. Has anyone ever really thought "this thing I dont' do that often took 3.5 seconds! So frustrating, I need it t o be 10 times faster than that!"...?

    • @ITSecNEO
      @ITSecNEO 4 місяці тому +2

      Ehm yes, time is money, so every second matters, at least for me

    • @felixfourcolor
      @felixfourcolor 4 місяці тому +2

      It's not an objective need for me, but it feels better to have snappy tools.

    • @dreww5866
      @dreww5866 4 місяці тому +1

      Don't do that often? Do you not use tox/nox?

    • @alvinthatyouknew
      @alvinthatyouknew 4 місяці тому +2

      In cicd pipelines it matters

    • @theresalwaysanotherway3996
      @theresalwaysanotherway3996 3 місяці тому +1

      if you're working on shitty hardware, this 3x difference could save minutes, not seconds.

  • @RealAPasz
    @RealAPasz 4 місяці тому

    In the modelling space we just spell it out.

  • @tonychia2227
    @tonychia2227 4 місяці тому

    is py an alias to python?

    • @Carberra
      @Carberra  4 місяці тому

      When installed via Pyenv at least, it's its own executable. I think it's very common to have it now, but I'm not sure it's everywhere. But yeah it's the same thing as the more verbose options.

    • @loomkkoom
      @loomkkoom 4 місяці тому +2

      Py ships as the python command when installed on windows, also enabling you to specify the version

  • @mayanksharma6927
    @mayanksharma6927 4 місяці тому +2

    Coming from node.js side, I find pip to be very half-baked and not very organized. I'd love to use a better package manager.

  • @truthmatters7573
    @truthmatters7573 4 місяці тому +3

    I think uv is meant to be pronounced U V, short for ultraviolet

    • @Carberra
      @Carberra  4 місяці тому

      I was thinking that but then wouldn't it stylised in all-caps?

    • @Bwanshoom
      @Bwanshoom 4 місяці тому +3

      That's correct. Charlie Marsh (author of uv & ruff) posted that it stands for either Ultraviolet or Universal "depending on which one you like better".

    • @Carberra
      @Carberra  4 місяці тому +1

      Okay, I can live with that at least. Still odd it's stylised all lower-case, but happier with "yoo-vee" than "uvv" lmao.

    • @truthmatters7573
      @truthmatters7573 4 місяці тому +2

      @@Carberra the all caps stylization would be confusing because terminal is case sensitive, but you don't wanna be the one command that requires capitalization and confuses the heck out of everyone... therefore to keep the conventionally all lowercase command and its branding consistent it should stick to lowercase even when stylized.

    • @Carberra
      @Carberra  4 місяці тому +2

      At that point just come up with a different name 😅 I get your point though.

  • @d3stinYwOw
    @d3stinYwOw 4 місяці тому +2

    Will they pay a some dime to creators of Pip, or do same thing which ruff did with projects like flake8? ;)

  • @davidmurphy563
    @davidmurphy563 4 місяці тому +5

    Hmm... I mean, is really fixing a burning real world dev problem? You might pip install one of two things a week. I suppose there are probably people who spend all day, every day pip installing like crazy and the time it takes is the bane of their existance; people that set up servers probably. That's not most people but okay. I guess a requirements.txt on a big project can take a fair bit of time. Faster is better. Prettier console text? Ok sure. I just want to know if it worked or not and see which dependency failed and pip does that but okay, prettier is better.
    Meh, an improvement is an improvement I guess. I'm struggling to get excited about it. Honestly, I doubt I'll bother with it. I guess if it becomes the default then I will like everyone else.

    • @juan.o.p.
      @juan.o.p. 4 місяці тому +7

      Faster installs make CI/CD pipelines faster (and cheaper)

    • @davidmurphy563
      @davidmurphy563 4 місяці тому

      @@juan.o.p. I've always suspected that the term "CI/CD pipeline" might be the most meaningless in all of IT - other than meaning "doing IT" - but I'm probably just getting cynical in my old age! :)

    • @Carberra
      @Carberra  4 місяці тому +2

      IMO innovation can't hurt. I've always thought pip was a bit meh, but I used it cos there's been nothing better. If uv comes along and changes that, all the better I say!

    • @davidmurphy563
      @davidmurphy563 4 місяці тому

      @@Carberra Absolutely, you're right at the end of the day. Better is better. Things should move forward. I suspect the reality for most people won't amount to much impact but still, it's part of the march forward. Onwards and upwards and all that.

    • @truthmatters7573
      @truthmatters7573 4 місяці тому +3

      Don't forget that being faster than pip is just the first step along the way, the end goal is to create a cargo like experience for Python. I can't wait to have polished and performant tooling for the python ecosystem. Poetry has already been a breath of fresh air, but it's not quite on par with a tool like cargo. Tooling around packaging and dependency management has always been the Achilles' heel of Python. If uv can fix that once and for all by becoming the de facto standard and provide an amazing developer experience out of the box, then that's a huge win.

  • @DezXereanas
    @DezXereanas 4 місяці тому +1

    Tbf ruff is also a garbage name for a linter/formatter. Did they fire the guy who came up with Astral?

    • @Carberra
      @Carberra  4 місяці тому +2

      He's currently head honcho, though I'll agree he has a knack of choosing some pretty bad names for tools lmao.

    • @truthmatters7573
      @truthmatters7573 4 місяці тому +3

      well, at least it's memorable and unique, so that's worth something :P
      I'd like to think they call it ruff because it will rough up your codebase and beat it into shape, but maybe i'm reading too much into it XD

    • @Carberra
      @Carberra  4 місяці тому +4

      I like to think he asked his dog to name it 😆

  • @DroolRockworm
    @DroolRockworm 4 місяці тому +1

    How many fucking python package management systems are there at this point? Ridiculous

    • @Carberra
      @Carberra  4 місяці тому

      I've been told this is the 9th, but there could be more out there we don't know about!

  • @Blaxter
    @Blaxter 4 місяці тому

    It's promising but nobody uses plain pip (either poetry or pipenv), uv is not a real replacement right now. Also it has the worst possible name ever, I'd rather stick with poetry

    • @Carberra
      @Carberra  4 місяці тому

      What dyou mean nobody uses pip lmao, I barely know anyone that _doesn't_. Agree with you regarding the name though.

    • @Blaxter
      @Blaxter 4 місяці тому

      everyone uses it underneath but you need a real package manager on top of it, i.e. pipenv, poetry, rye (or even conda). If you are using only pip that's pretty bad imho. All of them use pip behind the scenes though, rye has an experimental option right now to use uv instead of pip, will uv evolve to be a replacement for these? I hope so @@Carberra