Skip to content

Reckless uv installer #8430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

endothermicdev
Copy link
Collaborator

Important

25.09 FREEZE July 28TH: Non-bugfix PRs not ready by this date will wait for 25.12.

RC1 is scheduled on August 11th

The final release is scheduled for September 1st.

Checklist

Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:

  • The changelog has been updated in the relevant commit(s) according to the guidelines.
  • Tests have been added or modified to reflect the changes.
  • Documentation has been reviewed and updated as needed.
  • Related issues have been listed and linked, including any that this PR closes.

This PR allows reckless to use the uv python package manager when installing plugins. It maintains the same virtual environment location and source code location as used by the pip and poetry installers. There's also a driveby fix of an obscure direct install bug.

Some installer procedures have more options for valid entypoint
names than others. We iterate through each of their first choices,
then their second choices, etc..
uv is a python installation and package manager written in
rust.  We can use it to quickly install python package
dependencies and configure our plugin's python virtual environment.
To maintain consistency with our other reckless python
installations, the venv is still activated in a wrapper which then
imports the original python source.

Changelog-added: reckless can now install python plugins using the uv package manager.
@endothermicdev endothermicdev added this to the v25.09 milestone Jul 28, 2025
@@ -983,6 +986,37 @@ def cargo_installation(cloned_plugin: InstInfo):
return cloned_plugin


def install_python_uv(cloned_plugin: InstInfo):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just replace pip installation with uv as it supports all its capabilities

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just replace pip installation with uv as it supports all its capabilities

What if user doesn't have uv but has pip/poetry?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the general upgrade path is:

  1. Add the ability to install with uv.
  2. Switch python plugins over to a uv package management (this will break those plugins for existing users until they upgade to CLN/reckless 25.09
  3. Remove the legacy installers from reckless if no longer needed.

We generally try to support the last three releases, so encouraging all python plugins to switch to uv now would impact users of prior CLN versions. Unless we have a reliable way translate pip package requirements into a uv lockfile and do dependency resolution, I think we should keep the legacy installers around for a healthy amount of overlap as plugins make the transition.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense yeah I got the answer myself after pondering on it just didn't get to reply. We should definitely keep pip but remove poetry in the later releases probably as giving people too many options to do a single thing doesn't seem like a good idea.

If we can just pivot on uv as primary python plugin management tool that would be great.

@madelinevibes madelinevibes added Status::Ready for Review The work has been completed and is now awaiting evaluation or approval. PLEASE clear CI 🫠 labels Aug 6, 2025
@ShahanaFarooqui ShahanaFarooqui self-requested a review August 6, 2025 20:31
Copy link
Collaborator

@ShahanaFarooqui ShahanaFarooqui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I wanted to test the plugin with a real-world UV-managed Python plugin but couldn’t find any suitable example. Do you have any recommendation for a known project that uses UV for plugin management?

  • Additionally, would it make sense to add a test case for installing a test plugin via uv installer as well?

Comment on lines +1001 to +1002
(Path(cloned_plugin.source_loc) / 'pyproject.toml').\
symlink_to(source / 'pyproject.toml')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add support for requirements.txt using uv too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status::Ready for Review The work has been completed and is now awaiting evaluation or approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants