Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b18970d

Browse files
authored
Merge pull request #9418 from Kojoley/win-fix-faulthandler
TST: Disable faulthandler on Windows if CPython 3.6-3.6.3
2 parents d6f562e + 9e99be3 commit b18970d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/matplotlib/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,14 @@ def _init_tests():
13511351
except ImportError:
13521352
pass
13531353
else:
1354-
faulthandler.enable()
1354+
# CPython's faulthandler since v3.6 handles exceptions on Windows
1355+
# https://bugs.python.org/issue23848 but until v3.6.4 it was
1356+
# printing non-fatal exceptions https://bugs.python.org/issue30557
1357+
import platform
1358+
if not (sys.platform == 'win32' and
1359+
(3, 6) < sys.version_info < (3, 6, 4) and
1360+
platform.python_implementation() == 'CPython'):
1361+
faulthandler.enable()
13551362

13561363
# The version of FreeType to install locally for running the
13571364
# tests. This must match the value in `setupext.py`

0 commit comments

Comments
 (0)