File tree 3 files changed +3
-2
lines changed
3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,7 @@ Serhii Mozghovyi
337
337
Seth Junot
338
338
Shantanu Jain
339
339
Shubham Adep
340
+ Simon Blanchard
340
341
Simon Gomizelj
341
342
Simon Holesch
342
343
Simon Kerr
Original file line number Diff line number Diff line change
1
+ Handle an edge case where :data: `sys.stderr ` might already be closed when :ref: `faulthandler ` is tearing down.
Original file line number Diff line number Diff line change 1
- import io
2
1
import os
3
2
import sys
4
3
from typing import Generator
@@ -51,7 +50,7 @@ def get_stderr_fileno() -> int:
51
50
if fileno == - 1 :
52
51
raise AttributeError ()
53
52
return fileno
54
- except (AttributeError , io . UnsupportedOperation ):
53
+ except (AttributeError , ValueError ):
55
54
# pytest-xdist monkeypatches sys.stderr with an object that is not an actual file.
56
55
# https://docs.python.org/3/library/faulthandler.html#issue-with-file-descriptors
57
56
# This is potentially dangerous, but the best we can do.
You can’t perform that action at this time.
0 commit comments