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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Trying Out Rye

114 点作者 BerislavLopac大约 1 年前

20 条评论

CSSer大约 1 年前
This entire article has dog in burning house vibes, but I can’t tell if it was intentional or not. I’ll give them credit for being a good sport about it at any rate.<p>Homebrew is an interesting beast. I was debugging something architecture-related recently during one of my first forays into rust land and quickly learned that my brew-installed rust wasn’t going to cut it because I needed rustup. Meanwhile, I don’t think I’ve used brew-installed node since at least v12 because I use nvm to support and debug multiple projects with different node versions. Is this kind of thing just becoming par for the course?<p>For the pain with the Django project, I guess I’m also willing to cut Rye slack because the underlying goal seems admiral and sadly the problem the author encountered seems common in Python land in general.
评论 #40009089 未加载
评论 #40011706 未加载
评论 #40009728 未加载
评论 #40009130 未加载
评论 #40009162 未加载
nindalf大约 1 年前
It’s worth calling out that it’s still early days for Rye. The ownership recently transitioned from Armin Ronacher to the team that develops ruff (<a href="https:&#x2F;&#x2F;astral.sh" rel="nofollow">https:&#x2F;&#x2F;astral.sh</a>). No doubt limitations exist today, but it’s going to look a lot more like cargo as they put out more releases.
评论 #40009559 未加载
评论 #40009170 未加载
benrutter大约 1 年前
I&#x27;m curious what other people&#x27;s experiences are like with Rye? I&#x27;ve been using it for data projects (a little bit of web stuff with fast api) and haven&#x27;t hit a single hiccup at any point - it&#x27;s been an absolute dream and I usually forget it&#x27;s even there.<p>There&#x27;s a lot of compiled c code in things like numpy etc but it&#x27;s mostly precompiled in wheel files so I guess I&#x27;ve dodged the authors issue (unless I&#x27;ve misunderstood something?)<p>Am I just lucky that the data landscape is different - would the author&#x27;s issue happen with more or less any Django project?
评论 #40148436 未加载
aorth大约 1 年前
I&#x27;ve also been trying out Rye lately. I didn&#x27;t realize it had bundled formatting and linting:<p><pre><code> Black Rye bundles Ruff for formatting (rye fmt). Ruff Rye bundles Ruff for linting (rye lint). </code></pre> So that&#x27;s two less dependencies I need to install.
评论 #40011833 未加载
评论 #40010508 未加载
Kwpolska大约 1 年前
This is why I believe the package management tool should be separate from the interpreter management tool. Downloading a random third-party build can be valuable for some, but most people have a good enough interpreter on their machines.<p>This would also largely invalidate the need to write the package manager in Rust. A Rust program managing Python packages adds an unreasonable barrier to entry and makes Python seem like a toy language if it can&#x27;t manage its own packages.
评论 #40009931 未加载
评论 #40014978 未加载
评论 #40015266 未加载
darkteflon大约 1 年前
I recently switched to Rye from Hatch. The switch was pretty painless for a project.toml-based workflow.<p>I really liked Hatch, but Rye - uniquely among standards-compliant new-gen package managers, afaict - has reasonable support for Python monorepos through its “workspaces”, letting you specify multiple local packages as editable installs.<p>I do believe Hatch is considering adding this at some point, but for now Rye is a good fit for monorepos.<p>Very fast, too. Armin and Astral just do great work.
评论 #40012156 未加载
ac130kz大约 1 年前
I&#x27;ve replaced every bit of poetry and pdm with uv, which is clean, really fast and uses pyproject.toml and requirements.txt files. I don&#x27;t get why one would want to use rye.
评论 #40015350 未加载
fbdab103大约 1 年前
I think this article could have been more compelling with a more recent Django project. Django 2.0 officially supported Python ends at 3.7. Python 3.7 is out of support. Still annoying it does not work seamlessly, but I have foolish hope that recent builds would have pre-compiled artifacts on which you might be able to rely.<p>I am 100% bullish on some combination of PyBi, uv, or rye taking over the terror that is the ecosystem.
评论 #40009436 未加载
mafro大约 1 年前
I happened to try out Hatch this past weekend, and once I grokked the conventions it largely just worked.<p>If you like the look of Rye, I suggest trying Hatch also.
globular-toast大约 1 年前
I agree with the author that using standard pip and virtualenv etc. is fine. I feel like people want software with massive guard rails that they can just prod at until it does the right thing with no danger of it doing the wrong thing. That&#x27;s not been my experience with working with computers or any other machines and it won&#x27;t get you very far as a software engineer. The Python tools are really powerful and flexible but you need to learn how it works. Just a little bit.
评论 #40013075 未加载
评论 #40013026 未加载
评论 #40014298 未加载
mberning大约 1 年前
I was trying out a flask and tailwind based course on udemy and one of the first things they wanted me to do was download rye and do a bunch of other boilerplate stuff. I didn’t fancy downloading some random executable from the internet and running it just for a udemy course so I tried to grab the GitHub repo and build it. No dice. I finally gave up on rye and other python tooling and did the udemy course using sinatra and tailwind. Which was vastly easier.
评论 #40148557 未加载
评论 #40009044 未加载
评论 #40010845 未加载
评论 #40009799 未加载
garyrob大约 1 年前
I like Rye but missed virtualenvwrapper&#x27;s workon. So I made one: <a href="https:&#x2F;&#x2F;www.garyrobinson.net&#x2F;2024&#x2F;04&#x2F;bourbon-like-virtualenvwrappers-workon-but-for-rye.html" rel="nofollow">https:&#x2F;&#x2F;www.garyrobinson.net&#x2F;2024&#x2F;04&#x2F;bourbon-like-virtualenv...</a>
pkage大约 1 年前
What is the relationship between Rye and uv? Aren&#x27;t they now both under the Astral.sh umbrella?
评论 #40009765 未加载
pixelmonkey大约 1 年前
I tried out rye + uv on a recent greenfield project. They are awesome tools and I&#x27;m really excited about their potential.<p>For me, rye (+ uv underneath) has perhaps the perfect workflow for an open source Python project. So I&#x27;m definitely using rye for that from now on -- instead of, say, poetry -- or hatchling directly, following the PyPA boilerplate[1].<p>You have a way of doing local development against any Python interpreter version. You have a way of tweaking dependencies and a straightforward sync&#x2F;lock workflow. It all works atop &quot;standard&quot; PyPA infrastructure like pyproject.toml. You have a single command to build[1] project artifacts, like wheels. And you have a single command to publish new artifact versions to PyPI[2].<p>I think if you&#x27;re doing local development on a project that is not meant to be published to PyPI, like a private Django project, then whether to use rye becomes more of a debate. For example, for a Django project I&#x27;m working on, I decided to just use uv directly, along with a Makefile. This is because during development of a Django project, I preferred to just use a plain requirements.txt (really, requirements.in) file, avoid the sync&#x2F;lock workflow that rye imposes, and avoid the need to use something like &quot;rye run&quot;. And rye&#x27;s ability to build and package didn&#x27;t solve a problem this project had, since the Django project wasn&#x27;t being deployed via a PyPA packaging mechanism.<p>But this is probably also because the Python interpreter management problem, for me, is already handled by pyenv. I think if you&#x27;re not already a pyenv user, rye is even more appealing because it handles &quot;all&quot; of the Python issues -- interpreters, requirements&#x2F;dependencies, and packaging&#x2F;publishing. (As well as a number of other standard dev-time issues besides, like testing, linting, and formatting.) But, in my case, I could hand venv management to uv, and then make dependency management part of a larger Makefile for my Django project, including custom linting, testing, and deployment steps. I wrote a little bit about my high level thoughts on Python packaging and dependency management, though this post was written before rye and uv were out.[4] If I were to update this post now, I&#x27;d say that you could swap uv for pyenv-virtualenv + pip-tools and be happier for it, and you could swap rye for the PyPA boilerplate. That is, you could upgrade to rye, or use it from the start, if you need packaging support, or if you like its dev-time workflow.<p>I&#x27;ll also say, I found a little bug in how rye (+ hatch) interacted with my local git setup, and reported it to the rye team, and they helped me get to the bottom of it rather quickly.[5]<p>[1]: <a href="https:&#x2F;&#x2F;packaging.python.org&#x2F;en&#x2F;latest&#x2F;tutorials&#x2F;packaging-projects&#x2F;" rel="nofollow">https:&#x2F;&#x2F;packaging.python.org&#x2F;en&#x2F;latest&#x2F;tutorials&#x2F;packaging-p...</a><p>[2]: <a href="https:&#x2F;&#x2F;rye-up.com&#x2F;guide&#x2F;commands&#x2F;build&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rye-up.com&#x2F;guide&#x2F;commands&#x2F;build&#x2F;</a><p>[3]: <a href="https:&#x2F;&#x2F;rye-up.com&#x2F;guide&#x2F;commands&#x2F;publish&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rye-up.com&#x2F;guide&#x2F;commands&#x2F;publish&#x2F;</a><p>[4]: <a href="https:&#x2F;&#x2F;amontalenti.com&#x2F;2022&#x2F;10&#x2F;09&#x2F;python-packaging-and-zig" rel="nofollow">https:&#x2F;&#x2F;amontalenti.com&#x2F;2022&#x2F;10&#x2F;09&#x2F;python-packaging-and-zig</a><p>[5]: <a href="https:&#x2F;&#x2F;github.com&#x2F;astral-sh&#x2F;rye&#x2F;issues&#x2F;793">https:&#x2F;&#x2F;github.com&#x2F;astral-sh&#x2F;rye&#x2F;issues&#x2F;793</a>
评论 #40012535 未加载
评论 #40080951 未加载
tangentstorm大约 1 年前
Oh. I had hoped this was about <a href="https:&#x2F;&#x2F;ryelang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ryelang.org&#x2F;</a>.
评论 #40010548 未加载
评论 #40009233 未加载
评论 #40009814 未加载
评论 #40009741 未加载
tibanne大约 1 年前
Does auto format work in vscode?
评论 #40012412 未加载
JoyousAbandon大约 1 年前
Rye what?
crabbone大约 1 年前
&gt; I don’t actually consider the Python ecosystem and its tooling to be &quot;hot garbage&quot;.<p>And in the same breath proceeds to describe Python ecosystem as hot garbage, no quotation marks needed.<p>Comeon, why do all these mental gymnastics trying to convince yourself your tools don&#x27;t suck, when you already have all the evidence that they do?<p>As for Rye itself: yeah, no. pyproject.toml was supposed to do that... Of course it didn&#x27;t work. And so did plenty of other &quot;solutions&quot; (Pipenv? Poetry?) that try to work around the defective basic components instead of building from scratch.<p>To fix this problem for real, the first stage needs to be the one where the people working on the fix understand the problem. As long as these people aren&#x27;t willing to be honest with themselves and won&#x27;t admit how bad their work has been so far, it&#x27;s not going to get better. It will be more of the same band-aid.
languagehacker大约 1 年前
&gt; I also haven’t really bothered with project management tools like Poetry, since I think you can use virtual environments and pip and be just fine.<p>&#x2F;me close window
menacingly大约 1 年前
I find the Python community Stockholm syndrome over dependency management kind of charming, it feels like one of the old internet holy wars.<p>It&#x27;s absolutely nuts that you&#x27;d repeatedly meet the same criticism, independently arrived at all over the place, and just conclude it&#x27;s some statistical anomaly of bigotry and fools.<p>&quot;Well, I don&#x27;t have these problems, I just {{500 word article}}&quot;