mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
upgrading delegator.py to resolve PYTHONUNBUFFERED issue in shell
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
flake8 = ">=3.3.0,<4"
|
||||
pytest = "*"
|
||||
mock = "*"
|
||||
"delegator.py" = ">=0.0.12"
|
||||
"delegator.py" = ">=0.0.13"
|
||||
toml = "*"
|
||||
Sphinx = "<=1.5.5"
|
||||
|
||||
|
||||
Vendored
+3
-4
@@ -5,9 +5,6 @@ import signal
|
||||
|
||||
from pexpect.popen_spawn import PopenSpawn
|
||||
|
||||
# Enable Python subprocesses to work with expect functionality.
|
||||
os.environ['PYTHONUNBUFFERED'] = '1'
|
||||
|
||||
# Include `unicode` in STR_TYPES for Python 2.X
|
||||
try:
|
||||
STR_TYPES = (str, unicode)
|
||||
@@ -147,6 +144,8 @@ class Command(object):
|
||||
pexpect_kwargs = self._default_pexpect_kwargs.copy()
|
||||
if binary:
|
||||
pexpect_kwargs['encoding'] = None
|
||||
# Enable Python subprocesses to work with expect functionality.
|
||||
pexpect_kwargs['env']['PYTHONUNBUFFERED'] = '1'
|
||||
s = PopenSpawn(self._popen_args, **pexpect_kwargs)
|
||||
self.subprocess = s
|
||||
self.was_run = True
|
||||
@@ -260,4 +259,4 @@ def run(command, block=True, binary=False, timeout=TIMEOUT):
|
||||
if block:
|
||||
c.block()
|
||||
|
||||
return c
|
||||
return c
|
||||
|
||||
Reference in New Issue
Block a user