Replies: 25 comments 104 replies
-
Would be nice if you could compare it with existing efforts like Poetry. I didn't use Poetry extensively but my first impression was great. Curious to know what's your take on that? |
Beta Was this translation helpful? Give feedback.
-
Would a series of PEPs be a way forward to solve this issues you mention here? Would the effort be worth it? |
Beta Was this translation helpful? Give feedback.
-
Yea I consider the Rust tool-chain a kind of gold-standard when it comes to experience. I understand why it's not that simple to just turn The xkcd is a good one, but I still think there's value in creating and sharing your ideas. Garnering interest and forcing more discussion is beneficial for the ecosystem, no? |
Beta Was this translation helpful? Give feedback.
-
@mitsuhiko anything new and consistent is a win for community, I think however we all need a better packaging, distribution and build system for Python. |
Beta Was this translation helpful? Give feedback.
-
Yes, 100% should exist. You are right that something "official" should exist for Python that fills this niche, but pypa adopted several external projects that were relevant for it, so maybe rye could be such project. |
Beta Was this translation helpful? Give feedback.
-
I don't see myself using rye quite yet, but I appreciate the use of @indygreg's standalone Python builds. Personally I use those too (on macOS), together with some shell scripts to manage my virtual environments. I use poetry as well, but that can change. But I think rye should exist, and I'll track its development with interest. |
Beta Was this translation helpful? Give feedback.
-
I believe your summary already addresses the question at hand. The advantages clearly surpass any reasonable concerns. A well-defined roadmap should be created to identify the best practices, thus enabling the community to choose the package manager that best meets their needs. I haven't used poetry before, and the main idea behind rye isn't to instigate a C++ vs Rust debate, but rather to tackle significant issues that everyday developers face. I have been using conda for most scientific work and personal projects, though it has its drawbacks, such as complicating the export process. When using conda, you need to call pip freeze to export the environment, which seems counterintuitive. Furthermore, it doesn't detect all pip-installed packages - only those sourced from PyPI. I think |
Beta Was this translation helpful? Give feedback.
-
I think something similar to cargo & rustup for python should exist! I think setting up environments in python and installation are the biggest barriers to entry. If we can reduce those I think it'll be better for everyone :) I don't know if you've seen this project: I've used it a little bit and it seems great, if rye or huak can do all the similar things to cargo I will use them :) |
Beta Was this translation helpful? Give feedback.
-
Does PEP-711 (PyBI: a standard format for distributing Python Binaries) help with the python binary issue? Caveat that it gets accepted and implemented of course. |
Beta Was this translation helpful? Give feedback.
-
You can definitely call macOS APIs without being a framework. Framework-less Python builds are evidence of this.
My understanding is the framework builds of Python are more to facilitate other apps calling into Python’s APIs. The framework does provide a more consistent filesystem layout / API to target. But it isn’t strictly necessary.
|
Beta Was this translation helpful? Give feedback.
-
For what its worth I moved a small personal project to rye today and its a very good and clean experience. I had a series of scripts and used other tools like Taskfile to have a very similar experience to what rye offers. It's a big step in the right direction of tools in other languages like volta and the mentioned rust + cargo experience. Python is behind even if you can survive without those when you come back to Python it feels like a struggle. I guess in an ideal world it should not exist but its not the world we live in. Thanks for putting it out there! |
Beta Was this translation helpful? Give feedback.
-
I am 100% pip tools fan but by default i appreciate all tools you suggested so far, from click to your blog engine. On the basis of past programs' design, i am optimistic for rye. I am not a big fan of lock files though. Edit: Like i mean using pip-tools behind the scene is too cool! |
Beta Was this translation helpful? Give feedback.
-
This all seems very cool. I do think the XKCD is very misleading, because if you have 14 standards, and then introduce something that is overlaying over existing standards... you have 15 standards, but in theory you are sharing work and that can help proliferate good changes across the stack. We have already seen how virtualenvs being the "bottom level" of a lot of these projects has meant that virtualenvs "just work" for many definitions of work, and efforts to improve those helps everything! Any tool that is trying hard to use what exists, and inform the greater community of specific missing parts (beyond unactionable stuff like "confusing" or "hard for beginners"... it's hard for practitioners! Maybe we should get that right first) then we'll be making loads of forward progress. Anyways I really like how this tool should in theory work all over and doesn't involve any black magic. Will try to use it and see how far I can get |
Beta Was this translation helpful? Give feedback.
-
Sorry for this but my answer to your question is No. Before my ostracization please allow me to explain. First of all, not actually against this specific tool but I'm against all similar tools (i.e conda, pyenv, poetry whatever). But since you specifically actually asked I'm happy to answer this discussion. The python ecosystem is already way too crumbled with tools like this. Having options may seem like a good thing but in my opinion for the Python world it is not a good thing as the the Zen of Python reminds us:
Now, which is the obvious way? For me it is using the standard tools that python has to offer: pip and venv. All effort should be combined and geard towards improving these tool to support any missing features or workflows, not by introducing a new tool. Beyond that, please consider users that are new to Python. What should they use? How can they decide? Why burden them with options? I consider myself an experienced python developer (10+ years) and yet when I see all these tools I feel overwhelmed. Why not help these people with how to use Python with the standard tools instead? Finaly, the fact that native Windows is not fully supported is (at least for me) a very big problem for any Python package. Ok I'd be happy to be ostracized now. |
Beta Was this translation helpful? Give feedback.
-
As the author of a slightly popular (and divisive) blog post entitled How to improve Python packaging, or why fourteen tools are at least twelve too many, my opinion is s/fourteen/fifteen/; s/twelve/thirteen/. The thing that is the most worrisome is the use of Rust. I think Rust is a great language for lower-level systems programming; for many things, something higher-level than Rust is easier to work with and achieves equally good results. But in this specific case, we’re talking about tooling for Python. Does Python suck so much / is Python such a toy language that the packaging tools (and also code formatting tools) must be written in another language? At that point, why not skip Python entirely and write everything in Rust (or another competent language with tooling largely written in itself, like Java or C#?) In my opinion, installing and distributing Python should be distinct from installing and distributing packages. For your average Windows user, the user experience of “download and run the latest .msi from python.org” or “click Install in the Microsoft Store” is good enough. Beginners don’t need multiple Python versions and a Python version manager (but they do need packages). Businesses may standardise on “whatever RHEL ships and supports”, or on a single version they can install from custom packages tailored to their needs. Forcing the use of a custom-built Python limits the possible users of Rye and thus leads to more tooling proliferation. Ideally, there would be two separate tools¹:
Those tools would be separate, but they would also co-operate. Perhaps with a unified And even though the Steering Council killed PEP 582, I still think it’s the way to go, and that venvs are too confusing and unnecessary. But seeing the SC chose not to accept this PEP, and seeing that most of the ¹ Not the “two” I had in mind when writing the post’s headline — I accept the existence of a “scientist” tool separate from the “normal user” tool, so there could be three tools in total if the unified package management tool can’t solve all the scientists’ problems. |
Beta Was this translation helpful? Give feedback.
-
Since it was only casually mentioned in a reply, I thought I'd drop a link to https://discuss.python.org/t/announce-pybi-and-posy/23021/1 which announced PyBI (eventually PEP 711) and posy. Posy on the surface appears very similar in scope / vision to rye. There are significant parallels between this discussion and the linked PyBI/posy thread. My $0.02 is that tools like rye/posy python-build-standalone/PyBI are clearly demonstrating end-user benefits versus established solutions. Their presence ultimately enriches the Python ecosystem by at the very least providing valuable feedback on how to enshrine standards via PEPs and/or iteratively improve existing/popular tools/workflows. This experimentation is good and should be encouraged. As long as the presence of these alternative tools isn't externalizing significant hardship on Python package maintainers or the larger Python ecosystem, I have no basis to discourage or criticize any work in this space. Best of luck with Rye. I hope it meaningfully contributes to improving Python's ergonomics for n>>1 people. |
Beta Was this translation helpful? Give feedback.
-
Well, the project looks interesting, but why programming it using Rust as it's for Python? |
Beta Was this translation helpful? Give feedback.
-
Is it possible to make virtual environments automatic? When using npm, you don't need to explicitly activate your virtualenv, you can just cd into the directory and |
Beta Was this translation helpful? Give feedback.
-
Quoting my tweet: https://twitter.com/simonw/status/1651614850282569728
There are some really interesting new ideas in Rye - the way it installs a pre-compiled standalone Python binary in particular (as opposed to I think a working prototype of an idea leads to a much higher quality conversation, so on that front I'm a big fan of Rye existing already. |
Beta Was this translation helpful? Give feedback.
-
Pip + venv is now working well for my needs. For me the missing piece is how to install and manage Python versions/builds. |
Beta Was this translation helpful? Give feedback.
-
for data sciency use cases where i want more than one env at the same time i created hydraconda. supports monorepos where directories 'compose'. https://github.com/pnnl/hydraconda/tree/master/project |
Beta Was this translation helpful? Give feedback.
-
I'm really liking rye, and it seems clearer to me than the other tools I've tried. I notice I'm understanding things while learning rye that I didn't with those other tools. Perhaps it's just repeated exposure to the ideas, but I don't think so. Cargo made me want something like it for Python, and that feels like the direction rye has been going in. |
Beta Was this translation helpful? Give feedback.
-
I've just come across it, but am really liking Rye - I hope it does keep existing! I'm in no way affiliated with the python packaging authority, but whenever I hear them talk, it sounds a lot like they're actively looking at projects like these for direction (there's a good, but hour long, discussion that has a lot of members here. I really hope they'll pick something like this as a direction for python, but it sounds like that's some way off. One thing I really love about it (that puts me off tools such as poetry) is that because it wraps existing tools such as pip, so it's perfectly easy to either:
I think that's important because it avoids being the "15th standard" in the xkcd comic by not being a standard at all, but just a tool conforming to standards that already exist. |
Beta Was this translation helpful? Give feedback.
-
Two cents, I came across Rye from Kwpolska's posts and when I found that it actually handled every piece of Python lifecycle for development I was sold. Managing virtualenvs by hand or with tool proliferation (I like pyenv, but it only exists because there's a glaring hole in the language tooling) has always been a source of frustration for me. The best you can do is get good muscle memory on toggling your venv's, and this just doesn't need to be an issue. Now that I've been using rye for a couple months I don't want to use any other tools. I've had to bounce into some poetry projects, and having to remember to manage venv's again is a serious irritation. The only problems I've seen that Personally, I'm hoping the success of |
Beta Was this translation helpful? Give feedback.
-
I haven't tried Rye yet, so whatever comment I make at this point is all gut feeling and zero well-founded argument. Nevertheless, here we go:
That concludes my $0.02 for now! I may comment more, if and when I take Rye for a spin. |
Beta Was this translation helpful? Give feedback.
-
We all know XKCD #927:
This is how I feel about all the Python packaging. And this is why I never wanted to publish rye and kept it for myself. It's also incredibly hacky internally because it was never intended to be shared. However I really like what it does (at least in theory) and I desperately want it to exist.
As it stands today, it solves my problems — sort of. I wish it solved more of my problems but to a large degree what is missing, rye cannot really solve. Rye should not exist, it should just be the out of the box Python experience. The same way as Rust comes with
cargo
andrustup
, my dream solution for Python was that something likerye
exists and becomes the standard way to manage Python projects including getting the right interpreters. However that requires that such interpreters are actually distributed as binaries. Likewise forrye
to work, the underlying packages still need stuff that does not exist. Here are some things that would make a realrye
work:pyproject.toml
But even without all of this, rye could exist. In a sense it does today, but it exists to solve one developer's personal problems in his very personal way. I really have no desire to contribute more to the proliferation of Python packaging. Today the pypa org on github is what appears to be dozens of competing, largely independent efforts. In addition to that there is conda, there are now even companies appearing that are putting layers around conda as well. It's a pretty big mess.
I just want it solved, and I want to never have to think about Python packaging and project management every again. And until there is a standard tool we all rally around, I don't see that happen. I'm not sure if rye (or something like rye) could be that, but I do put the offer out.
So here is the question: should rye exist?
Beta Was this translation helpful? Give feedback.
All reactions