python-poetry / python-poetry/poetry
`poetry use pypy3` switches to a Python 3.6 venv if it already exists
Open
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 (
-vvvoption).
- OS version and name: Ubuntu 18.04
- Poetry version: 1.0.3
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/thedrow/5b7d581db41f2d8d40ca9e4c9c98d283
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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