Skip to content

Commit

Permalink
env: rename "system" to "base" in output of env info (#8832)
Browse files Browse the repository at this point in the history
  • Loading branch information
radoering committed Jan 1, 2024
1 parent a199981 commit a622bad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/managing-environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ poetry env info
will output something similar to this:

```text
Virtual environment
Virtualenv
Python: 3.7.1
Implementation: CPython
Path: /path/to/poetry/cache/virtualenvs/test-O3eWbxRl-py3.7
Valid: True
System
Base
Platform: darwin
OS: posix
Python: /path/to/main/python
Expand Down
10 changes: 5 additions & 5 deletions src/poetry/console/commands/env/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ def _display_complete_info(self, env: Env) -> None:

self.line("")

system_env = env.parent_env
python = ".".join(str(v) for v in system_env.version_info[:3])
self.line("<b>System</b>")
base_env = env.parent_env
python = ".".join(str(v) for v in base_env.version_info[:3])
self.line("<b>Base</b>")
self.line(
"\n".join([
f"<info>Platform</info>: <comment>{env.platform}</>",
f"<info>OS</info>: <comment>{env.os}</>",
f"<info>Python</info>: <comment>{python}</>",
f"<info>Path</info>: <comment>{system_env.path}</>",
f"<info>Executable</info>: <comment>{system_env.python}</>",
f"<info>Path</info>: <comment>{base_env.path}</>",
f"<info>Executable</info>: <comment>{base_env.python}</>",
])
)
2 changes: 1 addition & 1 deletion tests/console/commands/env/test_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_env_info_displays_complete_info(tester: CommandTester) -> None:
Executable: {sys.executable}
Valid: True
System
Base
Platform: darwin
OS: posix
Python: {'.'.join(str(v) for v in sys.version_info[:3])}
Expand Down

0 comments on commit a622bad

Please sign in to comment.