Skip to content

Commit c8a29ac

Browse files
authored
Merge pull request #4306 from philjc/issue-4305
2 parents 5549ee8 + 1689485 commit c8a29ac

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

news/4305.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a bug where Pipenv doesn't realize the session is interactive

news/4305.trivial.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Print class name instead of the object reference when using installer to install a python version

pipenv/environments.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -341,11 +341,7 @@ def get_from_env(arg, prefix="PIPENV", check_for_negation=True):
341341
)
342342

343343
# Internal, to tell whether the command line session is interactive.
344-
try:
345-
SESSION_IS_INTERACTIVE = _isatty(sys.stdout.fileno())
346-
except UnsupportedOperation:
347-
SESSION_IS_INTERACTIVE = _isatty(sys.stdout)
348-
344+
SESSION_IS_INTERACTIVE = _isatty(sys.stdout)
349345

350346
# Internal, consolidated verbosity representation as an integer. The default
351347
# level is 0, increased for wordiness and decreased for terseness.

pipenv/installers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ def __init__(self):
7171
self.cmd = self._find_installer()
7272
super(Installer, self).__init__()
7373

74+
def __str__(self):
75+
return self.__class__.__name__
76+
7477
@abstractmethod
7578
def _find_installer(self):
7679
pass

0 commit comments

Comments
 (0)