Fix pypy3.6 on windows

This commit is contained in:
Anthony Sottile 2019-09-07 16:48:27 -07:00
parent 8c8809e1aa
commit 9d7b919c7d
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1 @@
Fix pypy3.6 (nightly) on windows.

View File

@ -789,7 +789,11 @@ def _py36_windowsconsoleio_workaround(stream):
See https://github.com/pytest-dev/py/issues/103
"""
if not sys.platform.startswith("win32") or sys.version_info[:2] < (3, 6):
if (
not sys.platform.startswith("win32")
or sys.version_info[:2] < (3, 6)
or hasattr(sys, "pypy_version_info")
):
return
# bail out if ``stream`` doesn't seem like a proper ``io`` stream (#2666)