114
you are viewing a single comment's thread
view the rest of the comments
[-] FizzyOrange@programming.dev 2 points 4 months ago

Pip and venv have been tools that I’ve found to greatly accelerate dev setup and application deployment.

I'm not saying pip and venv are worse than not using them. They're obviously mandatory for Python development. I mean that compared to other languages they provide a pretty awful experience and you'll constantly be fighting them. Here's some examples:

  • Pip is super slow. I recently discovered uv which is written in Rust and consequently is about 10x faster (57s to 7s in my case).
  • Pip gives terrible error messages. For example it assumes all version resolution failures are due to requirements conflicts, when actually it can be due to Python version requirements too so you get insane messages like "Requirement foo >= 2.0 conflicts with requirement foo == 2.0". Yeah really.
  • You can't install multiple versions of the same dependency, so you end up in dependency resolution hell (depA depends on foo >= 3 but depB depends on foo <= 2).
  • No namespace support for package names so you can't securely use private PyPI repositories.
  • To make static typing work properly with Pyright and venv and everything you need some insane command like pip install --conf-settings editable-mode=compat --editable ./mypackage. How user friendly. Apparently when they changed how editable packages were installed they were warned that it would break all static tooling but did it anyway. Good job guys.
  • When you install an editable package in a venv it dumps a load of stuff in the package directory, which means you can't do it twice to two different venvs.
  • The fact that you have to use venvs in the first place is a pain. Don't need that with Deno.

There's so much more but this is just what I can remember off the top of my head. If you haven't run into these things just be glad your Python usage is simple enough that you've been lucky!

I’m actually in the process of making such a push where I’m at, for the first time in my career

Good luck!

[-] nickwitha_k@lemmy.sdf.org 1 points 4 months ago

Oh my. Yeah. I have seen these before indeed. IMO, that's also a sure sign that a compiled language needs to come into the picture (port the simplest conflicting component). Especially if, for some reason multiple dependency versions are needed (I have hit that in particular myself).

I've not yet had the pleasure of working with Rust much but that's the target for the next version that we start, so, will be fun.

[-] SatouKazuma@programming.dev 2 points 4 months ago

Rust is a lovely language if you're okay getting deep into the nuts and bolts.

this post was submitted on 13 Jul 2024
114 points (98.3% liked)

Programming

17314 readers
70 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS