python-poetry / python-poetry/poetry
Suggestion for different naming of virtual env in non-package mode
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
Issue Kind
Change in current behaviour
Description
Currently with non-package-mode = false when poetry creates the virtual environment it seems like the folder name for the venv is something like:
"non-package-mode-{pseudo random string}-{python version}"
e.g.,
"non-package-mode-WCWsJ_DC-py3.11"
I'm curious if there's a technical reason for that particular string being used--obviously there's not necessarily a project name as poetry would otherwise use in pyproject.toml , but compared to e.g., using the last element of the path the project is in I could see it causing some confusion in a case like this:
- I have several paths each using poetry in NPM to fiddle with different things
- I activate one, prepending some variation on "non-package-mode-some_string-py3.11" to my prompt
- I navigate away from the path the virtual env is relevant to
- it's no longer apparent which of my couple of experimental envs are active (since they would all prepend non-package-mode-py3.11) somewhat removing the utility of modifying the prompt
Impact
I imagine this causing some amount of confusion with developers who have multiple terminals open or work on several things at once.
Workarounds
I assume the activation script could be modified manually for each virtual env should this be a pressing issue for anyone
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 reviewing Poetry's current virtual-environment naming behavior and the issue's discussion about non-package mode. Determine and document an agreed naming scheme that distinguishes multiple environments, then verify that the resulting activation prompt and environment creation behavior meet that requirement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100