Readit News logoReadit News
the_mitsuhiko · 2 months ago
Turns out you can just do things. The astral tooling is by far the best thing that has happened to Python in years and it makes me very happy.
sambaumann · 2 months ago
using uv after years of fumbling with pip/venv, pyenv, conda, etc feels like a superpower. It really just works.
lioeters · 2 months ago
Even as an occasional casual Python user of several years, I noticed how much simpler it is to check out new projects using uv compared to other tools. It's such a relief because I used to encounter so many weird compatibility issues with Python, I guess mostly related to global installs of runtime versions and dependencies. In the past year or so, the situation seems to have dramatically improved thanks to uv.
TechDebtDevin · 2 months ago
Interesting. I basically dont touch python unless I have too becayse the lack of tooling. How does this tooling compare to an experience like working in Go?
CraigJPerry · 2 months ago
It's not rivaling Go anytime soon but there have been leaps and bounds.

E.g.

  uv init --script foo.py
  uv add --script foo.py httpx 
  cat foo.py
  ...
  dependencies = ['httpx']
  ...
Then on another machine:

  uv run foo.py
  # creates a virtual env, reads foo.py to see httpx is a dependency, installs in the ephemeral venv then runs the script
The above is from memory typed on a phone so maybe some minor syntax issues but the point i tried to make was we can kinda emulate the convenience of statically compiled binaries a-la Go these days

tajd · 2 months ago
I really like using UV. I introduced it at work for builds and it made everything a lot faster which was awesome. Now I can remove the other components of the build process and just use one.

I am interested in how they're going to make money eventually, but right now it's working for me.

Does anyone have an idea about how they're going to monetize?

djinnish · 2 months ago
I feel like that's the biggest question I have about Astral. I wonder what they have in the tank. All of this software is great, but I'd like to see them get some kind of benefit, if only to assure me that they'll continue to exist and make awesome software.

(And also so they'll implement the `pip download` functionality I'd like!)

StackTopherFlow · 2 months ago
Huge thank you for all the amazing work the astral team is doing. uv is an absolute game changer and I can’t imagine going back to a pre-uv world.
RGBCube · 2 months ago
Total distribution packager win!

Will it support the wide range of options setuptools does? Or maybe a build.rs equivalent - build.py, but in a sane way unlike setup.py.

notatallshaw · 2 months ago
Astral's focus has been to support the simplest use case, pure Python project with a standard layout. Their aim has been that most users, and especially beginners, should be able to use it with zero configuration.

As such they do not currently support C extensions, nor running arbitrary code during the build process. I imagine they will add features slowly over time, but with the continued philosophy of the simple and common cases should be zero configuration.

For Python experts who don't have special needs from a build backend I would recommend flit_core, simplest and most stable build backend, or hatching, very stable and with lots of features. While uv_build is great, it does mean that users building (but not installing) your project need to be able to run native code, rather than pure Python. But this is a pretty small edge case that for most people it won't be an issue.

fossa1 · 2 months ago
I think hatchling or setuptools are still better options (for now). Would be great to see a clean, declarative hook system in the future
h1fra · 2 months ago
I tried installing a Python project last week after years of avoiding it like the plague. brew install didn't work, use python3 not python, no pip pre-installed, ensurepip is crashing, you need to run sudo commands to fix this, after 1hour of struggle, repo didn't work anyway. how do people work like this?
NeutralForest · 2 months ago
You can just use uv now, that's the whole point, it will let you install any recent version of python and you can easily handle it from there. It'll also handle dependencies and one-off scripts for which you don't want to create a whole project/venv.

By rule, you should never meddle with the globally installed python because so many packages will try to look for the system installed Python and use it, better let your package manager handle it.

acdha · 2 months ago
> how do people work like this?

They don’t. That’s a sign that the local system is severely broken, and should be rebuilt to be stable. uv will still work in that case, but you’re going to constantly hit other points of friction on a mismanaged system which will waste time.

makeworld · 2 months ago
They use uv.
drcongo · 2 months ago
uv and ruff are the two best things to happen to Python in the 15 years I've been writing it. Everyone at Astral, I owe you a beer.
mkj · 2 months ago
The linked URL doesn't really explain, what does "stable" mean here?
NeutralForest · 2 months ago
It was marked as experimental earlier on, the docs linked are the stable version + how to use it.
milliams · 2 months ago
The admonition at the top:

  Currently, the default build backend for uv init is hatchling. This will change to uv in a future version.
makes it seem like it's not yet stable, or at least feels like they're still not encouraging it.

blahgeek · 2 months ago
I've been coding in Python for 10+ years but I can never really get python's tooling ecosystem. It seems that there's always a newer shiny choice. easy_install, pip, conda, virtualenv, pipenv, setup_tools, hatchling, setuptools-scm, uv, requirements.txt, pyproject.toml...

I wish python can provide an "official" solution to each problem (like in rust, there's cargo, end of story), or at lease, an official document describing the current best practice to do things.

tdhopper · 2 months ago
I'm not sure you'll get official documentation beyond the PPUG (https://packaging.python.org/en/latest/) which, for reasons, doesn't even mention uv.

For the last year or so, I've been trying to provide an alternative guide that stays abreast the best options and provides simple guides: https://pydevtools.com/.

twixfel · 2 months ago
They do provide official solutions. The problem is the official solution keeps changing.
mjd · 2 months ago
Thanks for saying all the stuff I was thinking in that other thread about Matt Trout.

I have a policy of not replying to throwaway accounts, and decided it wasn't worth breaking in this case. But I was really tempted.