diff --git a/news/4305.bugfix.rst b/news/4305.bugfix.rst new file mode 100644 index 00000000..70ab419f --- /dev/null +++ b/news/4305.bugfix.rst @@ -0,0 +1 @@ +Fix a bug where Pipenv doesn't realize the session is interactive diff --git a/news/4305.trivial.rst b/news/4305.trivial.rst new file mode 100644 index 00000000..17d38128 --- /dev/null +++ b/news/4305.trivial.rst @@ -0,0 +1 @@ +Print class name instead of the object reference when using installer to install a python version diff --git a/pipenv/environments.py b/pipenv/environments.py index b9d89806..005d0a2d 100644 --- a/pipenv/environments.py +++ b/pipenv/environments.py @@ -341,11 +341,7 @@ PIPENV_SHELL = ( ) # Internal, to tell whether the command line session is interactive. -try: - SESSION_IS_INTERACTIVE = _isatty(sys.stdout.fileno()) -except UnsupportedOperation: - SESSION_IS_INTERACTIVE = _isatty(sys.stdout) - +SESSION_IS_INTERACTIVE = _isatty(sys.stdout) # Internal, consolidated verbosity representation as an integer. The default # level is 0, increased for wordiness and decreased for terseness. diff --git a/pipenv/installers.py b/pipenv/installers.py index 18abdd74..1e81047d 100644 --- a/pipenv/installers.py +++ b/pipenv/installers.py @@ -71,6 +71,9 @@ class Installer(object): self.cmd = self._find_installer() super(Installer, self).__init__() + def __str__(self): + return self.__class__.__name__ + @abstractmethod def _find_installer(self): pass