File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 3
3
import selectors
4
4
import sys
5
5
import tempfile
6
- from asyncio import get_event_loop_policy , set_event_loop_policy
7
- from asyncio .unix_events import _UnixDefaultEventLoopPolicy
6
+ from asyncio import DefaultEventLoopPolicy , get_event_loop_policy , set_event_loop_policy
8
7
from io import IOBase
9
8
10
9
import questionary
23
22
)
24
23
25
24
26
- class CZEventLoopPolicy (_UnixDefaultEventLoopPolicy ):
25
+ class CZEventLoopPolicy (DefaultEventLoopPolicy ): # type: ignore
27
26
def get_event_loop (self ):
28
27
self .set_event_loop (self ._loop_factory (selectors .SelectSelector ()))
29
28
return self ._local ._loop
@@ -37,7 +36,7 @@ def __init__(self, stdx: IOBase):
37
36
fd = os .open ("/dev/tty" , os .O_RDWR | os .O_NOCTTY )
38
37
tty = open (fd , "wb+" , buffering = 0 )
39
38
else :
40
- tty = open ("/dev/tty" , "wb" )
39
+ tty = open ("/dev/tty" , "w" ) # type: ignore
41
40
else :
42
41
fd = os .open ("/dev/tty" , os .O_RDWR | os .O_NOCTTY )
43
42
if self ._fileno == 0 :
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ def test_WrapStdx(mocker):
230
230
wrap_stout .write ("data" )
231
231
232
232
if sys .platform == "linux" :
233
- writer_mock .assert_called_once_with ("/dev/tty" , "wb " )
233
+ writer_mock .assert_called_once_with ("/dev/tty" , "w " )
234
234
else :
235
235
pass
236
236
writer_mock ().write .assert_called_once_with ("data" )
@@ -244,7 +244,7 @@ def test_WrapStdx(mocker):
244
244
wrap_sterr .write ("data" )
245
245
246
246
if sys .platform == "linux" :
247
- writer_mock .assert_called_once_with ("/dev/tty" , "wb " )
247
+ writer_mock .assert_called_once_with ("/dev/tty" , "w " )
248
248
else :
249
249
pass
250
250
writer_mock ().write .assert_called_once_with ("data" )
You can’t perform that action at this time.
0 commit comments