python-poetry / python-poetry/poetry

`poetry use pypy3` switches to a Python 3.6 venv if it already exists

Open
#2,089 8 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/venv
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

When I try to switch my environment to PyPy3 using poetry use pypy3 but have previously typed poetry use 3.6 poetry switches to the CPython 3.6 virtualenv instead of creating a new virtualenv for pypy3.
You can reproduce this by doing the following:

$ poetry env use 3.6
Using virtualenv: /home/thedrow/.cache/pypoetry/virtualenvs/jumpstarter-H8PwDp0q-py3.6
$ poetry env use pypy3
Using virtualenv: /home/thedrow/.cache/pypoetry/virtualenvs/jumpstarter-H8PwDp0q-py3.6
$ poetry run which pypy3
/home/thedrow/.pyenv/shims/pypy3 # should be the virtualenv's pypy

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior with the poetry env use 3.6, poetry env use pypy3, and poetry run which pypy3 commands shown in the issue. The fix is complete when selecting pypy3 does not reuse the existing CPython 3.6 virtualenv and poetry run which pypy3 resolves to the virtualenv's interpreter.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.