7 ms·
I'd put type annotations and GIL removal above UV without a second thought. UV is still young and I hit some of those growing pains. While it is very nice, I'm
by verdverm 1y ago
I'd put type annotations and GIL removal above UV without a second thought. UV is still young and I hit some of those growing pains. While it is very nice, I'm not going to put it up there with sliced bread, it's just another package manager among many
- WD-42 1y agoAs far as impact on the ecosystem I’d say uv is up there. For the language itself you are right. Curious if you’ve come across any real use cases for Gil-less python. I haven’t yet. Seems like everything that would benefit from it is already written in highly optimized native modules.
- seabrookmx 1y ago> Seems like everything that would benefit from it is already written in highly optimized native modules Or by asyncio.
- WD-42 1y agoI'm pretty ignorant about this stuff but I think asyncio is for exactly that, asynchronus I/O. Whereas GIL-less Python would be beneficial for CPU bound programs. My day job is boring so I'm never CPU bound, always IO bound on the database or network. If there is CPU heavy code, it's in Numpy. So I'm not sure if Gil-less actually helps there.
- nomel 1y agoasyncio is unrelated to the parallelism prevented by the GIL.
- rustystump 1y agoI second and third this. I HATE python but uv was what made it usable to me. No other language had such a confusing obnoxious setup to do anything with outside of js land. uv made it sane for me.
- giancarlostoro 1y agoNode definitely needs its own "uv" basically.
- jampekka 1y agoType annotations were introduced in 2008 and even type hints over decade ago in Sept 2015.
- brcmthrowaway 1y agoWhat happend with GIL-removal
- verdverm 1y agoYou can disable it, here's the PEP, search has more digestible options https://peps.python.org/pep-0703/ https://peps.python.org/pep-0703/
- zahlman 1y agoFor that matter, IMX much of what people praise uv for is simply stuff that pip (and venv) can now do that it couldn't back when they gave up on pip. Which in turn has become possible because of several ecosystem standards (defined across many PEPs) and increasing awareness and adoption of those standards. The "install things that have complex non-Python dependencies using pip" story is much better than several years ago, because of things like pip gaining a new resolver in 2020, but in large part simply because it's now much more likely that the package you want offers a pre-built wheel (and that its dependencies also do). A decade ago, it was common enough that you'd be stuck with source packages even for pure-Python projects, which forced pip to build a wheel locally first (https://pradyunsg.me/blog/2022/12/31/wheels-are-faster-pure-python/ https://pradyunsg.me/blog/2022/12/31/wheels-are-faster-pure-...). Another important change is that for wheels on PyPI the installer can now obtain separate .metadata files, so it can learn what the transitive dependencies are for a given version of a given project from a small plain-text file rather than having to speculatively download the entire wheel and unpack the METADATA file from it. (This is also possible for source distributions that include PKG-INFO, but they aren't forced to do so, and a source distribution's metadata is allowed to have "dynamic" dependencies that aren't known until the wheel is built (worst case) or a special metadata-only build hook is run (requires additional effort for the build system to support and the developer to implement)).
- verdverm 1y agoFor sure, we see the same thing in the JS ecosystem. New tooling adds some feature, other options implement feature, convergence to a larger common set. I'm still mostly on poetry
- 9dev 1y agoThe things you list may be a reason for some, but in all discussions I’ve had and read about on uv, the reason is that it behaves as a package manger should. It can just install dependencies from an automatically generated lockfile. It can update outdated minor versions. It can tell me about outdated versions of my dependencies. It can reproduce a build on another machine. The lock file can be put into version control. A coworker can run a single command to install everything. It abstracts the stupidity that is virtual environments away so much you don’t even have to touch them anymore. And also, it’s fast. Wake me up when pip can do any of that.
- KaiserPro 1y agotyped annotations that are useful. Currently they are a bit pointless. Sure they aid in documentation, but they are effort and cause you pain when making modifications (mind you with halfarse agentic coding its probably less of a problem. ) What would be better is to have a strict mode where instead of duck typing its pre-declared. It would also make a bunch of things faster (along with breaking everything and the spirit of the language) I still don't get the appeal of UV, but thats possibly because I'm old and have been using pyenv and venv for many many years. This means that anything new is an attack on my very being. however if it means that conda fucks off and dies, then I'm willing to move to UV.
- KK7NIL 1y agoYou can get pretty darn close to static typing by using ty (from the same team as uv). I've been using it professionally and its been a big improvement for code quality.
- ggm 1y ago> it's just another package manager among many It's the python version of fink vs macports vs homebrew. Or apt vs deb. or pkgsrc vs ports. But I don't think "its just another" gets the value proposition here. It's significantly simpler to deploy in practice for people like me, writing ad hoc scripts and running git downloaded scripts and codelets. Yes, virtualenv and pip existed. No, they turned out to be a lot more fiddly to run in practice than UV. That UV is rust is funny, but not in a terrible way. The llvm compiler toolchain is written in C but compiles other languages. Using one language to do things for another language isn't such a terrible outcome. I hope UV supplants the others. Not to disrespect their authors, but UV is better for end users. If its worse for package maintainers I think the UV authors should be told.
- morshu9001 1y agoI don't want type annotations. Was kinda the point of Python not to deal with types.
- surajrmal 1y agoIf you've ever used python on a project above a certain size (both lines of code and people who contribute to it), type annotations quickly become something you find useful.
- morshu9001 1y agoI have, it didn't really help. It does help if you have no tests, but a large project needs tests.
- never_inline 1y agoI guess you don't use an IDE. Use VSCode or IntelliJ with auto completion and error highlighting as you type. Type hints are a blessing.
- morshu9001 1y agoPyCharm does this without the hints
- never_inline 1y agoHow would that work across files and libraries?
- morshu9001 1y agoPresumably with static analysis. I don't know exactly how this works, but it's surprisingly good.
- verdverm 1y ago