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

feat: poetry env remove should display full path if using in-project virtualenvs #9321

Open
jonathanpv opened this issue Apr 18, 2024 · 0 comments
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@jonathanpv
Copy link

Issue Kind

Change in current behaviour

Description

Here's me trying to delete the venv that was created locally by poetry (doing this for vscode compatibilty)

It wasn't obvious that the env to remove needed a full path

So I had to do poetry env remove --all

Which of course may not be desirable for people

I suggest a helper message
If using local in-project virtualenvs be sure to specify the full path of the venv
or always displaying the venv path

teto@Ashleys-iMac InternHelper % poetry env list
.venv (Activated)
teto@Ashleys-iMac InternHelper % poetry env remove \.env

[Errno 2] No such file or directory: '.env'
teto@Ashleys-iMac InternHelper % poetry env remove \.\env

[Errno 2] No such file or directory: '.env'
teto@Ashleys-iMac InternHelper % poetry env remove \.\venv

[Errno 2] No such file or directory: '.venv'
teto@Ashleys-iMac InternHelper % poetry env remove ".venv"

[Errno 2] No such file or directory: '.venv'
teto@Ashleys-iMac InternHelper % poetry env remove --help 

Description:
  Remove virtual environments associated with the project.

Usage:
  env remove [options] [--] [<python>...]

Arguments:
  python                     The python executables associated with, or names of the virtual environments which are to be removed.

Options:
      --all                  Remove all managed virtual environments associated with the project.
  -h, --help                 Display help for the given command. When no command is given display help for the list command.
  -q, --quiet                Do not output any message.
  -V, --version              Display this application version.
      --ansi                 Force ANSI output.
      --no-ansi              Disable ANSI output.
  -n, --no-interaction       Do not ask any interactive question.
      --no-plugins           Disables plugins.
      --no-cache             Disables Poetry source caches.
  -C, --directory=DIRECTORY  The working directory for the Poetry command (defaults to the current working directory).
  -v|vv|vvv, --verbose       Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
teto@Ashleys-iMac InternHelper % poetry env remove --all 
Deleted virtualenv: /Users/teto/textbook-search/InternHelper/.venv
teto@Ashleys-iMac InternHelper %                          

Impact

User experience improvement

Workarounds

Current workaround is to increase your skill with poetry and python

@jonathanpv jonathanpv added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant