diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-04-06 18:18:01 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-04-06 18:18:01 +0300 |
commit | 01fbacb386809436dfa331780875aed72cb76118 (patch) | |
tree | 04c911ad96ff0523bd4d3e7a45c23cf2f2d7607d /contrib/python/prompt-toolkit/py3/prompt_toolkit/eventloop | |
parent | 48fb997d7f820a474b9094a72d9798a95ec612b7 (diff) | |
download | ydb-01fbacb386809436dfa331780875aed72cb76118.tar.gz |
intermediate changes
ref:b4f892f3c2b06a356c155f73c27efc5661a7fb89
Diffstat (limited to 'contrib/python/prompt-toolkit/py3/prompt_toolkit/eventloop')
-rw-r--r-- | contrib/python/prompt-toolkit/py3/prompt_toolkit/eventloop/inputhook.py | 5 | ||||
-rw-r--r-- | contrib/python/prompt-toolkit/py3/prompt_toolkit/eventloop/win32.py | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/contrib/python/prompt-toolkit/py3/prompt_toolkit/eventloop/inputhook.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/eventloop/inputhook.py index 26228a2af3..05d298117e 100644 --- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/eventloop/inputhook.py +++ b/contrib/python/prompt-toolkit/py3/prompt_toolkit/eventloop/inputhook.py @@ -26,13 +26,12 @@ import asyncio import os import select import selectors +import sys import threading from asyncio import AbstractEventLoop from selectors import BaseSelector, SelectorKey from typing import TYPE_CHECKING, Any, Callable, List, Mapping, Optional, Tuple -from prompt_toolkit.utils import is_windows - from .utils import get_event_loop __all__ = [ @@ -141,7 +140,7 @@ class InputHookSelector(BaseSelector): # However, if we would ever want to add a select call, it # should use `windll.kernel32.WaitForMultipleObjects`, # because `select.select` can't wait for a pipe on Windows. - if not is_windows(): + if sys.platform != "win32": select.select([self._r], [], [], None) os.read(self._r, 1024) diff --git a/contrib/python/prompt-toolkit/py3/prompt_toolkit/eventloop/win32.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/eventloop/win32.py index a53632e0e8..fbc02d493a 100644 --- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/eventloop/win32.py +++ b/contrib/python/prompt-toolkit/py3/prompt_toolkit/eventloop/win32.py @@ -1,3 +1,7 @@ +import sys + +assert sys.platform == "win32" + from ctypes import pointer from ..utils import SPHINX_AUTODOC_RUNNING |