Skip to content
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

Support for uv #248

Open
2 of 3 tasks
zefr0x opened this issue May 16, 2024 · 3 comments
Open
2 of 3 tasks

Support for uv #248

zefr0x opened this issue May 16, 2024 · 3 comments

Comments

@zefr0x
Copy link

zefr0x commented May 16, 2024

  • I have searched the issues (including closed ones) and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.
  • I am willing to lend a hand to help implement this feature.
    • I don't have experience with fish scripting, but I might take a look at the code base.

Feature Request

Support for Astral.sh's new uv tool as a drop-in alternative for pip and virtualenv commands.

@justinmayer
Copy link
Owner

What is the rationale for this proposal? What problems would it solve?

@zefr0x
Copy link
Author

zefr0x commented May 16, 2024

What is the rationale for this proposal? What problems would it solve?

  1. If I'm using uv it wouldn't make scene to have python-virtualenv and other utilities that provide the same functionality in my system.

  2. uv will make most tasks blazingly faster for people who want to use it, since it was written in lower level language with best practices and doesn't have the limitations of current tools. (Benchmarks: https://github.com/astral-sh/uv/blob/main/BENCHMARKS.md)


The only disadvantage that I can see is that uv might not support every thing used in virtualfish, but we need to take a look at virtualfish's code base first.

@justinmayer
Copy link
Owner

If someone would like to propose a uv-related PR in a way that notably improves VirtualFish, I would be happy to merge it.

I am not much interested in purity. Respectfully, I believe that terms like “lower level” and “best practices” are largely subjective and unrelated to providing good end-user experiences.

As it relates to speed, the provided benchmarks link talks about dependency resolution, which is only related to VirtualFish by way of its use of Pip to install packages. As far as virtual environments, virtual environment creation is faster in uv but not in a way that is noticeable to end users — both uv and Virtualenv create environments in milliseconds. Virtual environment activation speeds are comparable, in the single-digit milliseconds for each.

Perhaps new environment variable setting(s) could be added that allow the user to choose which tool(s) to use for (1) virtual environment creation and (2) package installation. Something like:

set -gx VIRTUALFISH_VENV_TOOL "virtualenv"  # Or "uv", etc.
set -gx VIRTUALFISH_PACKAGE_TOOL "pip"    # Or "uv", etc.

Ideally such a change would be implemented in the form of a plugin, if technically feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants