News for hackers. Stuff that matters.
Re:Hypermodern Python by seemslegit on Thursday May 28, 2020 @08:19AM (#23336382)
> This article series is a guide to modern Python tooling with a focus on simplicity and minimalism

No it isn't, it introduces at least two external tools of questionable necessity - pyenv and poetry when python comes with venv and pip natively.

Re:Hypermodern Python by nilkn on Thursday May 28, 2020 @06:28PM (#23343645)
I think you're confused: pyenv is not a replacement for venv. It's just a tool for installing Python itself. It never occurred to me until just now that the name is confusing and makes it seem like it's related to venv.
Re:Hypermodern Python by snth on Thursday May 28, 2020 @09:43AM (#23337114)
You can install and manage more than one version of Python with pyenv.
Re:Hypermodern Python by jacobush on Thursday May 28, 2020 @08:22AM (#23336393)
Yeah, but pip and venv don’t leave me impressed, so please elaborate why those are better.
Re:Hypermodern Python by smcl on Thursday May 28, 2020 @08:26AM (#23336432)
I think that given pip and venv are bundled with Python, then anyone who wants to introduce new dependencies to replace them needs to justify themselves. I haven't used either pyenv or poetry so I have no opinion on them.
Re:Hypermodern Python by dhagz on Thursday May 28, 2020 @08:44AM (#23336577)
The benefit of pyenv seems clear to me - it's a simpler way to have multiple Python installs and manage which one is your "default" Python at a project, directory, user, system, and global level (they can even all be different).

Poetry...not so much. requirements.txt is good enough for me most of the time.

Re:Hypermodern Python by akdor1154 on Thursday May 28, 2020 @10:53AM (#23337980)
Poetry gives you exactly what pip and venv give you, with the two pretty much perfectly integrated, in a way that is pleasant to use and not something that you'll grudgingly migrate your project to after your fifth dependency.
Re:Hypermodern Python by matanrubin on Thursday May 28, 2020 @09:10AM (#23336806)
Well, poetry gives you a lock file, separation between dev dependencies and runtime dependencies, and easy deployments to PyPI. If you're hacking a oneof-script you might not need these features, but for "real" projects Poetry is invaluable.
Re:Hypermodern Python by maest on Thursday May 28, 2020 @08:24AM (#23336417)
I have yet to find venv or pip lacking in anything I do - I think the onus is on external tools to prove their worth.
Re:Hypermodern Python by baq on Thursday May 28, 2020 @08:24AM (#23336413)
they're bundled.

unless you're on some flavor of ubuntu where they aren't bundled with the system python. then you're in python packaging hell.

Re:Hypermodern Python by kortex on Thursday May 28, 2020 @08:40AM (#23336549)
I've been running stacks with venv and pip for years and it's been perfectly adequate. The main addon I use is virtualenvwrapper which basically just give sugar for mkvirtualenv and workon.
Re:Hypermodern Python by mikewhy on Thursday May 28, 2020 @10:29AM (#23337695)
5 tools mentioned to get started working with Python dependencies. Am I ever glad to not deal with the language anymore.
Re:Hypermodern Python by kortex on Thursday May 28, 2020 @01:42PM (#23340135)
I mean, like I said, there's really just venv and pip, and mentally I almost consider them the same tool (some say they ought to have been).

Node avoids the need for a "venv" because each project has its own "venv", which if you have a 700mb pytorch install, ick.

Rust/go don't deal with .so files to the extent python does, so cargo/godep have an easier time. Python is a C abstraction layer.

So like, I'm not sure how much less you need than "package manager" and "env manager".

Re:Hypermodern Python by roosterdawn on Thursday May 28, 2020 @02:05PM (#23340365)
> Yeah, but pip and venv don’t leave me impressed, so please elaborate why those are better.

Maybe you misspoke, but whether you are left impressed or not is your opinion. What is factual is that these tools are the ecosystem's default tools for their jobs, and have been for a long time. I have relied on them operating multiple production codebases over the course of a decade.

I think you need to elaborate on what about that doesn't suit your needs rather than that they don't impress you for some vague, unspecified and potentially arbitrary reason.

To answer your question, why do they impress me? They get out of my way, they work, and they don't require me to do anything but have a system version of Python installed. With them, I get reasonably sane package management and environment isolation without headaches. That's enough for me.

Re:Hypermodern Python by seemslegit on Thursday May 28, 2020 @08:25AM (#23336421)
Whether they are better or not is up to you to decide, but "focus on simplicity and minimalism" is not what's going on here.
Re:Hypermodern Python by airstrike on Thursday May 28, 2020 @12:36PM (#23339304)
> don’t leave me impressed

I don't think impressing you was one of their design goals... If you claim different tools like poetry are better, then the burden of proof is on you

Re:Hypermodern Python by drahazar on Thursday May 28, 2020 @08:39AM (#23336546)
can you expand on what you meant here?

What things do you want to do that pip and venv can't (or make it difficult) to do?

What features does Poetry and Pyenv provide that these don't?