Skip to content

Conversation

philjc
Copy link

@philjc philjc commented Jun 2, 2020

The issue

Fixes bug #4305 introduced in c23e57b which no longer identifies if the tty session is interactive. Which prevents pipenv from using pyenv to install a version of python that doesn't exist in pyenv

When this commit migrated to use vistir._isatty it bypassed os.isatty which supports fileno while vistir._isatty does not. Also since vistir._isatty swallows all exceptions we no longer need to catch UnsupportedOperation

The fix

Instead of passing in the sys.stdout.fileno() to vistir._isatty pass in the stream

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix, .feature, .behavior, .doc. .vendor. or .trivial (this will appear in the release changelog).

@philjc philjc changed the title Issue 4305 Fixes bug 4305, which no prompts to installs a pyenv python version that doesn't exist Jun 2, 2020
Copy link
Member

@techalchemy techalchemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch... this is definitely a huge issue, thanks for the PR!

@techalchemy techalchemy merged commit c8a29ac into pypa:master Jun 2, 2020
@techalchemy techalchemy added the Category: CLI Issue relates to the CLI label Jun 2, 2020
@techalchemy techalchemy added this to the 2020.6.x bugfix release milestone Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Category: CLI Issue relates to the CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants