-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add env command #278
Add env command #278
Conversation
Thanks for taking the time to put this PR together. Some information are already present in the "debug:info" command. So I'm not sure about having duplicate commands. Also, I am not a big fan of options executing actions. I know this is the Finally, I am still on the fence here about exposing the virtualenv since, to me, this is an implementation detail and, ideally, I would like Poetry to not even use them and use a more clever approach. I am not saying it will come anytime soon but introducing a Anyway, I am leaving this PR open for now since I still need to wrap my head around it and to continue the discussion. |
That's reasonable enough. Don't feel bad about closing this PR, it was just an experiment. But I do think #270 requires some action, and that feature can be implemented in another command just as easily. What alternative to virtual environments do you have in mind? I don't know any other approaches. |
Could poetry maybe output just the path to the venv on Also, how about poetry putting it's venvs to ~/.virtualenvs, which is a path many Python IDEs search for virtual environments? Of course, an actual IDE/IDE plugin support would be ideal, but, at least in the case of VSCode's Python extension, the version not starting with 1 is an issue, apparently. See issue. @sdispater The issue with having this info in the |
@golyalpha Perhaps the command I agree with @sdispater though, it would be ideal if we generally didn't have to think about a venv. I think poetry has already done the hard parts by being able to detect them and setup one if required. The main other requirements are to view (and customise) the location and remove them. @golyalpha definitely has a point in that As for removing a venv I would have it has a flag to |
beside the fact that'd i'd prefer |
@yunti It's great that Poetry is trying to abstract the env away from the developer, but that is not exactly something that IDEs like. IDEs like knowing where the interpreter itself is, not how they can get to it through the usage of and external tool (in poetry's case: TL;DR: Note: |
@sdispater It was more of a proof of concept. I'm quite happy with the design you ended up implementing. Great job, as usual ;) |
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 21.12b0 → 22.1.0](psf/black@21.12b0...22.1.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
To satisfy the needs expressed in #270 (and, to some extent, #198), I added an
env
command.If this gets a greenlight, I'll add tests and docs.