File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -347,6 +347,7 @@ Seth Junot
347
347
Shantanu Jain
348
348
Sharad Nair
349
349
Shubham Adep
350
+ Simon Blanchard
350
351
Simon Gomizelj
351
352
Simon Holesch
352
353
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