Skip to content

Commit f0eac06

Browse files
authored
Merge pull request #13937 from anntzer/faultless
Use PYTHONFAULTHANDLER to switch on the Python fault handler.
2 parents e62401f + 40b0b74 commit f0eac06

File tree

5 files changed

+6
-16
lines changed

5 files changed

+6
-16
lines changed

.appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ clone_depth: 50
1414
environment:
1515

1616
global:
17+
PYTHONFAULTHANDLER: 1
1718
PYTHONIOENCODING: UTF-8
1819
PYTEST_ARGS: -raR --numprocesses=auto --timeout=300 --durations=25
1920
--cov-report= --cov=lib --log-level=DEBUG

azure-pipelines.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,21 @@ jobs:
2323
architecture: 'x64'
2424

2525
- script: |
26-
2726
python -m pip install --upgrade pip
2827
pip install -r requirements/testing/travis_all.txt -r requirements/testing/travis36.txt
29-
3028
displayName: 'Install dependencies'
3129
3230
- script: |
33-
3431
export MPLLOCALFREETYPE=1
3532
pip install -ve .
36-
3733
displayName: "Install self"
3834
3935
- script: env
4036
displayName: 'print env'
4137

4238
- script: |
4339
env
44-
pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2 --log-level=DEBUG
40+
PYTHONFAULTHANDLER=1 pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2 --log-level=DEBUG
4541
displayName: 'pytest'
4642
4743
- task: PublishTestResults@2
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The test suite no longer turns on the Python fault handler by default
2+
`````````````````````````````````````````````````````````````````````
3+
4+
Set the standard ``PYTHONFAULTHANDLER`` environment variable to do so.

lib/matplotlib/__init__.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,16 +1308,6 @@ def tk_window_focus():
13081308

13091309

13101310
def _init_tests():
1311-
# CPython's faulthandler since v3.6 handles exceptions on Windows
1312-
# https://bugs.python.org/issue23848 but until v3.6.4 it was printing
1313-
# non-fatal exceptions https://bugs.python.org/issue30557
1314-
import platform
1315-
if not (sys.platform == 'win32' and
1316-
(3, 6) < sys.version_info < (3, 6, 4) and
1317-
platform.python_implementation() == 'CPython'):
1318-
import faulthandler
1319-
faulthandler.enable()
1320-
13211311
# The version of FreeType to install locally for running the
13221312
# tests. This must match the value in `setupext.py`
13231313
LOCAL_FREETYPE_VERSION = '2.6.1'

requirements/testing/travis_all.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ pillow
77
pyparsing
88
pytest!=4.6.0
99
pytest-cov
10-
pytest-faulthandler
1110
pytest-rerunfailures
1211
pytest-timeout
1312
pytest-xdist

0 commit comments

Comments
 (0)