Rye and uv #1342
Replies: 25 comments 59 replies
-
The new UV features look great! |
Beta Was this translation helpful? Give feedback.
-
Update: Since Does As best I can tell from the CLI reference, the answer is no, but it's not completely clear. The relevant passage I found after quite a bit of searching is:
Relatedly, I feel like your docs need some adjustment after version 0.3 and to make them easier to navigate (when looking for this kind of info, at least). The docs on project management (project concepts, projects guide) are not trivial to find, and it's hard to guess before reading them which of them (if either) will have the needed info. After reading them, they do not seem to address the question (I could have missed the answer hiding somewhere, though; I also haven't experimented with it yet and things might become clearer once I do). Rye is a good example to follow for clear docs. It is easier for |
Beta Was this translation helpful? Give feedback.
-
FWIW: the most alarmingly great thing about rye is that it works just as good on windows (many python things don't work good on windows). My place of work develops for rhel and windows, so having both "work good" is crucial. |
Beta Was this translation helpful? Give feedback.
-
I am a bit worried that you plan to make people switch from rye to uv eventually. The confusion has some potential to end both projects. (Perl 6 as the most egregious example.) Have you considered for the future to simply rename |
Beta Was this translation helpful? Give feedback.
-
Probably a bit lower on your list, but we use the polylith plugin for rye to make our monorepo setup work: https://github.com/DavidVujic/python-polylith-example-rye apart from the nice tooling the polylith CLI offers, key functionality and setup here is:
I am not a rust programmer, so maybe this is all already covered by the workspaces concept? |
Beta Was this translation helpful? Give feedback.
-
I think Edit: Uv now does this for uv init --app --package |
Beta Was this translation helpful? Give feedback.
-
Rye's support for Rust modules out-of-the-box is quite nice. It was something that I'd love to see get even more love. Any chance uv will focus on supporting this as well. It enhances both languages considerably I feel, if that friction is removed in what's likely a future standard too. I'd like to be able to have a python directory with notebooks (a la Zed repl) inside my rust repos and be able to setup rust in my python repos to add code easily. And I think reducing that friction would bring a lot to the table. (Nice work on supporting single-file scripts, btw. I'm looking forward to that coming out of nightly in Rust for the 2024 version.) |
Beta Was this translation helpful? Give feedback.
-
I just migrated from rye to uv. It was relatively straightforward - got most of the way there by replacing [tool.rye] with [tool.uv] in pyproject.toml The docker build required slightly more changes because previously I was copying in rye's Likewise the github action was straightforward to set up by following the guide as well. |
Beta Was this translation helpful? Give feedback.
-
Really excited to make the switch to uv! Thanks for all the great work :) If I understood the docs about dependencies and alternative indexes correctly, I can only specify the source for a specific dependency and I could set [[tool.rye.sources]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cpu" I have a bunch of dependencies from my own index and it would be cool to just include it as an additional source like I can do with rye. Or are there some bad consequences when doing that? Would be interested if someone else would like this feature. |
Beta Was this translation helpful? Give feedback.
-
On Linux, the thing that has stopped me the most from updating Python has been the worry of accidentally overwriting my system Python. I want to install every major point release, and keep them updated. I also would potentially like to try out new beta versions if needed, but I want all of these installs to be easily discovered within PyCharm, even with new projects. It seems like Rye might allow this (or a subset) via |
Beta Was this translation helpful? Give feedback.
-
Does In particular, because |
Beta Was this translation helpful? Give feedback.
-
Build and publish? Or have I missed something? |
Beta Was this translation helpful? Give feedback.
-
Would uv support commands like |
Beta Was this translation helpful? Give feedback.
-
Will uv support rye.virtual configuration? I'm not sure there is a configuration that will accomplish the same thing. I don't want to install the project itself into the environment. |
Beta Was this translation helpful? Give feedback.
-
I personally use Rye to build wheels and publish them to pypi ( |
Beta Was this translation helpful? Give feedback.
-
A low hanging fruit is that |
Beta Was this translation helpful? Give feedback.
-
For me, aside from liking the python shim (which somebody else has mentioned) the main thing stopping me from swapping to uv (from rye) is for team projects where rye is working well, the different locations for dev dependencies in It's kinda caused by python not having a standard dev requirements protocol, but it would be amazing for some kind of magic setting to tell uv "no actually look at this section for dev requirements instead". |
Beta Was this translation helpful? Give feedback.
-
I just found out rye and uv, and from the conversation, it seems rye and uv have both its pros and cons, and uv being under development, may potentially replace rye(?)... So should i start using uv directly? I only need for basic python packages, not yet building large scale projects... |
Beta Was this translation helpful? Give feedback.
-
If only |
Beta Was this translation helpful? Give feedback.
-
Is there a doc for migrating from rye to uv? It should be a relatively simple process, but would still be good to have instructions |
Beta Was this translation helpful? Give feedback.
-
I think that uv compared with rye, uv's function and feature is more simple and practical |
Beta Was this translation helpful? Give feedback.
-
The feature of generating the project layout for pyo3 is very important to me—it was almost the sole reason I switched from poetry to rye. Some of my work-related projects are highly performance-sensitive, and pyo3 provides significant benefits. However, before using rye, I couldn't find a tool that allowed me to initialize a project in under 30 seconds. By the way, I’ve been using uv to manage my experiments because its locking mechanism is simple, intuitive, and fast.If uv had better support for pyo3, I would have switched to uv without hesitation. |
Beta Was this translation helpful? Give feedback.
-
I think that uv and rye docs should point to some of their differences and overall goal. I was a bit confused on why they were developing two projects, and which one should I use, specially because the homepage of each tools describe them as the same thing. rye:
uv:
The only answer is from astral blog which I doubt developers will read or even find.
Letting developers know uv is the intended successor should cause less problems in the future. EDIT: I want to clarify that the docs should contain that information and not hidden behind blogs. |
Beta Was this translation helpful? Give feedback.
-
If rye becomes a progressively thin layer to uv while maintaining its functionality, that won't be so bad either. |
Beta Was this translation helpful? Give feedback.
-
The great feature I thought rye has is the string interpolation for index URL in |
Beta Was this translation helpful? Give feedback.
-
👋 Since we took over stewardship of Rye in February, we've been continuing to maintain the project and ship releases, but have been primarily focused on new feature development over in uv.
Rye uses uv under-the-hood, so it's also benefited from those changes (e.g., Rye's universal mode is powered by uv's universal resolver).
With the release of uv 0.3.0, uv is capable of supporting more and more Rye-like workflows. For example, uv can now download Python for you, generate lockfiles via
uv lock
anduv sync
, and so on.We don't plan to deprecate Rye any time soon, but our goal has always been to maintain it while we develop uv into a viable alternative. I suspect that uv can now replace Rye for some use cases, but I'm interested in hearing from Rye users: what is uv missing that would stop you from switching over? Where should we focus, if our goal is to enable smooth transition for Rye users in the future?
Beta Was this translation helpful? Give feedback.
All reactions