Skip to content

Comments

env: rename "system" to "base" in output of env info#8832

Merged
Secrus merged 2 commits intopython-poetry:masterfrom
radoering:env-info-system-base
Jan 1, 2024
Merged

env: rename "system" to "base" in output of env info#8832
Secrus merged 2 commits intopython-poetry:masterfrom
radoering:env-info-system-base

Conversation

@radoering
Copy link
Member

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

When running poetry env info, information about the currently active virtualenv and it's base Python is printed. However, the base Python is called system, which might be confusing if the base Python is not the system Python. For example, consider the following sequence of commands:

$ poetry env use 3.9
Using virtualenv: /home/randy/.cache/pypoetry/virtualenvs/poetry-gXMMKm0L-py3.9

$ poetry env info

Virtualenv
Python:         3.9.16
Implementation: CPython
Path:           /home/randy/.cache/pypoetry/virtualenvs/poetry-gXMMKm0L-py3.9
Executable:     /home/randy/.cache/pypoetry/virtualenvs/poetry-gXMMKm0L-py3.9/bin/python
Valid:          True

System
Platform:   linux
OS:         posix
Python:     3.9.16
Path:       /usr
Executable: /usr/bin/python3.9

$ poetry env use system
Deactivating virtualenv: /home/randy/.cache/pypoetry/virtualenvs/poetry-gXMMKm0L-py3.9

$ poetry env info

Virtualenv
Python:         3.8.10
Implementation: CPython
Path:           /home/randy/.cache/pypoetry/virtualenvs/poetry-gXMMKm0L-py3.8
Executable:     /home/randy/.cache/pypoetry/virtualenvs/poetry-gXMMKm0L-py3.8/bin/python
Valid:          True

System
Platform:   linux
OS:         posix
Python:     3.8.10
Path:       /usr
Executable: /usr/bin/python3.8

Thus, it probably makes more sense to call it "base" instead of "system".

@radoering radoering requested a review from a team December 30, 2023 16:33
@Secrus Secrus enabled auto-merge (squash) January 1, 2024 23:21
@Secrus Secrus merged commit a622bad into python-poetry:master Jan 1, 2024
@github-actions
Copy link

github-actions bot commented Mar 3, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
@radoering radoering deleted the env-info-system-base branch August 16, 2025 10:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants