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 7
7
import subprocess
8
8
import sys
9
9
import tempfile
10
- from asyncio import get_event_loop_policy , set_event_loop_policy
11
- from asyncio .unix_events import _UnixDefaultEventLoopPolicy
10
+ from asyncio import DefaultEventLoopPolicy , get_event_loop_policy , set_event_loop_policy
12
11
from io import IOBase
13
12
14
13
import questionary
31
30
from commitizen .git import smart_open
32
31
33
32
34
- class CZEventLoopPolicy (_UnixDefaultEventLoopPolicy ):
33
+ class CZEventLoopPolicy (DefaultEventLoopPolicy ): # type: ignore
35
34
def get_event_loop (self ):
36
35
self .set_event_loop (self ._loop_factory (selectors .SelectSelector ()))
37
36
return self ._local ._loop
@@ -45,7 +44,7 @@ def __init__(self, stdx: IOBase):
45
44
fd = os .open ("/dev/tty" , os .O_RDWR | os .O_NOCTTY )
46
45
tty = open (fd , "wb+" , buffering = 0 )
47
46
else :
48
- tty = open ("/dev/tty" , "wb" )
47
+ tty = open ("/dev/tty" , "w" ) # type: ignore
49
48
else :
50
49
fd = os .open ("/dev/tty" , os .O_RDWR | os .O_NOCTTY )
51
50
if self ._fileno == 0 :
Original file line number Diff line number Diff line change @@ -575,7 +575,7 @@ def test_WrapStdx(mocker):
575
575
wrap_stout .write ("data" )
576
576
577
577
if sys .platform == "linux" :
578
- writer_mock .assert_called_once_with ("/dev/tty" , "wb " )
578
+ writer_mock .assert_called_once_with ("/dev/tty" , "w " )
579
579
else :
580
580
pass
581
581
writer_mock ().write .assert_called_once_with ("data" )
@@ -589,7 +589,7 @@ def test_WrapStdx(mocker):
589
589
wrap_sterr .write ("data" )
590
590
591
591
if sys .platform == "linux" :
592
- writer_mock .assert_called_once_with ("/dev/tty" , "wb " )
592
+ writer_mock .assert_called_once_with ("/dev/tty" , "w " )
593
593
else :
594
594
pass
595
595
writer_mock ().write .assert_called_once_with ("data" )
You can’t perform that action at this time.
0 commit comments