TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Poetry – Python dependency management and packaging

46 点作者 reedwolf将近 5 年前

18 条评论

zelphirkalt将近 5 年前
Poetry still has to fight with bugs, as you can see looking at the git repository and the issues there. However, in most cases it works fine for me.<p>Dependency resolution might be a hard problem to solve concurrently, but it would be great, if poetry did not only use a single core, to speed up the process.
kelsolaar将近 5 年前
Poetry is awesome, it has its quirks but really simplified our work at <a href="https:&#x2F;&#x2F;www.colour-science.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.colour-science.org&#x2F;</a>. We have dropped Conda entirely as it solved all our previous Pip dependency hell that ended up with the adoption of Conda.<p>As I&#x27;m writing that we are coincidentally and unfortunately plagued by random CI failures occurring when Poetry resolves the dependencies: <a href="https:&#x2F;&#x2F;github.com&#x2F;actions&#x2F;virtual-environments&#x2F;issues&#x2F;1343" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;actions&#x2F;virtual-environments&#x2F;issues&#x2F;1343</a>
评论 #24089543 未加载
评论 #24089644 未加载
Animats将近 5 年前
Another Python packaging system? I thought we were done when &quot;wheels&quot; replaced &quot;eggs&quot;. (&quot;Eggs&quot;, of course, replaced &quot;setup.py&quot; files.)
评论 #24089403 未加载
评论 #24089398 未加载
评论 #24090295 未加载
Caligatio将近 5 年前
I&#x27;m a big fan of Poetry (I have a few commits in there) but it&#x27;s not without its downsides.<p>At least a few months ago, you needed to install an entire compilation suite if you wanted to install a pure-Python source distribution (sdist) that was created with Poetry on Alpine. Somewhat by design, sdists created with Poetry require Poetry to install. Poetry itself is dependent on the cryptography package which, like all like all packages that use native-C extensions, suffers from a lack of musl-compatible wheels.
评论 #24089435 未加载
ris将近 5 年前
&gt; With x, packaging in Python is a solved problem<p>This is the claim that has been made about every &quot;advancement&quot; in python packaging for the last 20 years. Some of us have been kicking around long enough to remember the great saviour being distutils, setuptools, easy_install, eggs, wheels, pip, pipfiles&#x2F;pip-tools... The truth being that all people have managed to do is produce a horrific mess with an ever growing tower of components each of which never <i>really</i> solves the problem (and now people want me to add &quot;tox&quot; to the mix too!). I have to say that packaging is really the worst part of the python world.<p>I do my best these days to avoid every component of the python packaging ecosystem I possibly can and use Nix as much as possible, which really Just Solves The Problem.
评论 #24107601 未加载
emmanueloga_将近 5 年前
I&#x27;m a complete outsider to the python ecosystem, from time to time I need to write a script or use a popular python library like pygments and I used to hate having to do anything with python because of how difficult it seemed to install anything (cognitive overload of having 20 different ways to install things...).<p>Anyway, recently I discovered miniconda and it seems like the best, most unambiguous way to install python. It is small (in rel terms...), it works like a charm on Windows, and I can just do something run a single command like `conda install pygments` and I&#x27;m all set!<p>Just not sure why I would ever need to look into something like poetry, although I heard conda and poetry can complement each other somehow? (as do pip, easy_install or whatever is called and all the others haha :-p).
评论 #24089684 未加载
评论 #24090008 未加载
评论 #24089655 未加载
abalaji将近 5 年前
Poetry is fantastic but it looks like pip is trying to create their own competitor. [1] I would much prefer if the pypa folks and the poetry folks got together to more tightly integrate the systems. Poetry solves a ton of problems ranging from venv management to making packaging easier to splitting dev and production dependencies. Consider me a huge fan.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;pypa&#x2F;pip&#x2F;issues&#x2F;8511#issuecomment-665140265" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pypa&#x2F;pip&#x2F;issues&#x2F;8511#issuecomment-6651402...</a>
nurettin将近 5 年前
Would have been nice if poetry shell loaded .env<p>I got used to that workflow with pipenv.
评论 #24089430 未加载
ai_ja_nai将近 5 年前
What&#x27;s the advantage over pipenv?
评论 #24089507 未加载
评论 #24089557 未加载
turbinerneiter将近 5 年前
I tried it and liked it, really simple to use, but:<p>* how do I use it to install i.e. service files, config files etc.? * can I use it to generate Deb&#x2F;RPM packages?<p>I&#x27;m not sure if packaging applications is as much of goal as packaging libraries, but I felt that it was missing stuff to do the former.
评论 #24183468 未加载
ianamartin将近 5 年前
I&#x27;m going to sound like a very grumpy old man—because that&#x27;s what I am—but if you actually need a tool like poetry, you&#x27;ve really fucked up.<p>I have a ton of respect for the author. It&#x27;s really good code and solves a hard problem in elegant ways. But it&#x27;s a problem that we shouldn&#x27;t let ourselves have.<p>It&#x27;s like a patient talking to a therapist:<p>patient: I&#x27;m really depressed.<p>therapist: Why do you think that is?<p>p: Well, I&#x27;ve been having an affair with this woman, and my wife found out about it.<p>t: How does she feel about that?<p>p: She&#x27;s pretty angry at me. It&#x27;s affecting our relationship.<p>t: How is it affecting your relationship?<p>p: Well, she doesn&#x27;t want to have sex with me anymore, and things have gotten a little weird with the kids.<p>t: How do you feel about not having sex with your wife?<p>p: It&#x27;s depressing.<p>t: And the kids? How do you feel about them?<p>p: They&#x27;ll grow up and understand eventually.<p>t: Here&#x27;s a pill you can take every day that will make you feel better.<p>There are two ways to address this kind of situation. The first way is to give the patient a pill to fix the symptom of depression. The second way is to fix the behavior that&#x27;s causing the depression.<p>Poetry (and Cargo and other package&#x2F;dependency managers) are a little pill you can take to make you feel better about stuff.<p>But there&#x27;s another school of therapy. I&#x27;m maybe going to sound a little like Zed Shaw here, but there&#x27;s the &quot;Don&#x27;t fucking do that&quot; school of therapy.<p>It&#x27;s possible to fix the underlying behavior that&#x27;s causing the pain instead of taking a pill. It&#x27;s harder and requires more work, sure. But in the long term it is a better, more stable solution.<p>Since I&#x27;m already on a bit of a rant, I&#x27;ll go ahead and say it out loud: agile is the source of many of these types of problems. You start out with good intentions and then one day you end up married to a thing that was only supposed to be a proof-of-concept, but it got shipped because product team and velocity, and now your life is hell, and that POC now has kids, and you&#x27;re legally responsible for them, and fuck it, just give me a pill, doctor.<p>Poetry is a brilliant solution to a problem we shouldn&#x27;t create for ourselves.
评论 #24090061 未加载
dmarchand90将近 5 年前
Previous discussion: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20672436" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20672436</a>
softinio将近 5 年前
I tried it for the first time couple of months ago and I loved it, its my preferred way of managing python packages given the choice. Would love to see greater adoption.
merricksb将近 5 年前
Discussed here 7 months ago:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21779191" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21779191</a>
dagenix将近 5 年前
Poetry is far and away the most interesting solution when its comes to managing Python dependencies.
评论 #24089327 未加载
midrus将近 5 年前
<a href="https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;</a><p>Finally! A standard for managing dependencies in Python.
jayaram将近 5 年前
I ended up with PyScaffold and never turned back again!
kissgyorgy将近 5 年前
I agree. Never had any problem with it so far.