File tree 1 file changed +1
-12
lines changed 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
import asyncio
16
- import io
17
16
import os
18
17
import subprocess
19
18
import sys
@@ -43,22 +42,12 @@ def compute_driver_executable() -> Path:
43
42
async def run_driver_async () -> Connection :
44
43
driver_executable = compute_driver_executable ()
45
44
46
- # Sourced from: https://github.com/pytest-dev/pytest/blob/824e9cf67abcfc47df25a59bf32ebd8c25fbd02a/src/_pytest/faulthandler.py#L70-L77
47
- def _get_stderr_fileno () -> int :
48
- try :
49
- return sys .stderr .fileno ()
50
- except (AttributeError , io .UnsupportedOperation ):
51
- # pytest-xdist monkeypatches sys.stderr with an object that is not an actual file.
52
- # https://docs.python.org/3/library/faulthandler.html#issue-with-file-descriptors
53
- # This is potentially dangerous, but the best we can do.
54
- return sys .__stderr__ .fileno ()
55
-
56
45
proc = await asyncio .create_subprocess_exec (
57
46
str (driver_executable ),
58
47
"run-driver" ,
59
48
stdin = asyncio .subprocess .PIPE ,
60
49
stdout = asyncio .subprocess .PIPE ,
61
- stderr = _get_stderr_fileno () ,
50
+ stderr = sys . stderr ,
62
51
limit = 32768 ,
63
52
)
64
53
assert proc .stdout
You can’t perform that action at this time.
0 commit comments