Loading CHANGELOG.md +4 −0 Changes for CHANGELOG.md: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,6 +2,10 @@ ## [Unreleased] ### Added - Added a `debug:info` command to get information about current environment. ### Fixed - Fixed Python version retrieval inside virtualenvs. Loading poetry/console/application.py +2 −0 Changes for poetry/console/application.py: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ from .commands import RunCommand from .commands import ShowCommand from .commands import UpdateCommand from .commands.debug import DebugInfoCommand from .commands.debug import DebugResolveCommand Loading Loading @@ -99,6 +100,7 @@ class Application(BaseApplication): # Debug commands commands += [ DebugInfoCommand(), DebugResolveCommand(), ] Loading poetry/console/commands/debug/__init__.py +1 −0 Changes for poetry/console/commands/debug/__init__.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line from .info import DebugInfoCommand from .resolve import DebugResolveCommand poetry/console/commands/debug/info.py 0 → 100644 +51 −0 Changes for poetry/console/commands/debug/info.py: 51 added lines, 0 removed lines. Original line number Diff line number Diff line import os import sys from ..venv_command import VenvCommand class DebugInfoCommand(VenvCommand): """ Shows debug information. debug:info """ def handle(self): poetry = self.poetry package = poetry.package venv = self.venv poetry_python_version = '.'.join(str(s) for s in sys.version_info[:3]) self.output.title('Poetry') self.output.listing([ '<info>Version</info>: <comment>{}</>'.format(poetry.VERSION), '<info>Python</info>: <comment>{}</>'.format(poetry_python_version) ]) self.line('') venv_python_version = '.'.join(str(s) for s in venv.version_info[:3]) self.output.title('Virtualenv') self.output.listing([ '<info>Python</info>: <comment>{}</>'.format( venv_python_version ), '<info>Implementation</info>: <comment>{}</>'.format( venv.python_implementation ), '<info>Path</info>: <comment>{}</>'.format( venv.venv if venv.is_venv() else 'NA' ) ]) self.line('') self.output.title('System') self.output.listing([ '<info>Platform</info>: <comment>{}</>'.format(sys.platform), '<info>OS</info>: <comment>{}</>'.format(os.name), ]) self.line('') Loading
CHANGELOG.md +4 −0 Changes for CHANGELOG.md: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,6 +2,10 @@ ## [Unreleased] ### Added - Added a `debug:info` command to get information about current environment. ### Fixed - Fixed Python version retrieval inside virtualenvs. Loading
poetry/console/application.py +2 −0 Changes for poetry/console/application.py: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ from .commands import RunCommand from .commands import ShowCommand from .commands import UpdateCommand from .commands.debug import DebugInfoCommand from .commands.debug import DebugResolveCommand Loading Loading @@ -99,6 +100,7 @@ class Application(BaseApplication): # Debug commands commands += [ DebugInfoCommand(), DebugResolveCommand(), ] Loading
poetry/console/commands/debug/__init__.py +1 −0 Changes for poetry/console/commands/debug/__init__.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line from .info import DebugInfoCommand from .resolve import DebugResolveCommand
poetry/console/commands/debug/info.py 0 → 100644 +51 −0 Changes for poetry/console/commands/debug/info.py: 51 added lines, 0 removed lines. Original line number Diff line number Diff line import os import sys from ..venv_command import VenvCommand class DebugInfoCommand(VenvCommand): """ Shows debug information. debug:info """ def handle(self): poetry = self.poetry package = poetry.package venv = self.venv poetry_python_version = '.'.join(str(s) for s in sys.version_info[:3]) self.output.title('Poetry') self.output.listing([ '<info>Version</info>: <comment>{}</>'.format(poetry.VERSION), '<info>Python</info>: <comment>{}</>'.format(poetry_python_version) ]) self.line('') venv_python_version = '.'.join(str(s) for s in venv.version_info[:3]) self.output.title('Virtualenv') self.output.listing([ '<info>Python</info>: <comment>{}</>'.format( venv_python_version ), '<info>Implementation</info>: <comment>{}</>'.format( venv.python_implementation ), '<info>Path</info>: <comment>{}</>'.format( venv.venv if venv.is_venv() else 'NA' ) ]) self.line('') self.output.title('System') self.output.listing([ '<info>Platform</info>: <comment>{}</>'.format(sys.platform), '<info>OS</info>: <comment>{}</>'.format(os.name), ]) self.line('')