diff --git a/.appveyor.yml b/.appveyor.yml index f9df89971c67..f955293124a9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -14,6 +14,7 @@ clone_depth: 50 environment: global: + PYTHONFAULTHANDLER: 1 PYTHONIOENCODING: UTF-8 PYTEST_ARGS: -raR --numprocesses=auto --timeout=300 --durations=25 --cov-report= --cov=lib --log-level=DEBUG diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5ca99ecbbdcb..795101bee9cf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -23,17 +23,13 @@ jobs: architecture: 'x64' - script: | - python -m pip install --upgrade pip pip install -r requirements/testing/travis_all.txt -r requirements/testing/travis36.txt - displayName: 'Install dependencies' - script: | - export MPLLOCALFREETYPE=1 pip install -ve . - displayName: "Install self" - script: env @@ -41,7 +37,7 @@ jobs: - script: | env - pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2 --log-level=DEBUG + PYTHONFAULTHANDLER=1 pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2 --log-level=DEBUG displayName: 'pytest' - task: PublishTestResults@2 diff --git a/doc/api/next_api_changes/2019-04-13-AL.rst b/doc/api/next_api_changes/2019-04-13-AL.rst new file mode 100644 index 000000000000..835429b473c6 --- /dev/null +++ b/doc/api/next_api_changes/2019-04-13-AL.rst @@ -0,0 +1,4 @@ +The test suite no longer turns on the Python fault handler by default +````````````````````````````````````````````````````````````````````` + +Set the standard ``PYTHONFAULTHANDLER`` environment variable to do so. diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py index 99f74864c872..3f1735deef13 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py @@ -1350,16 +1350,6 @@ def tk_window_focus(): def _init_tests(): - # CPython's faulthandler since v3.6 handles exceptions on Windows - # https://bugs.python.org/issue23848 but until v3.6.4 it was printing - # non-fatal exceptions https://bugs.python.org/issue30557 - import platform - if not (sys.platform == 'win32' and - (3, 6) < sys.version_info < (3, 6, 4) and - platform.python_implementation() == 'CPython'): - import faulthandler - faulthandler.enable() - # The version of FreeType to install locally for running the # tests. This must match the value in `setupext.py` LOCAL_FREETYPE_VERSION = '2.6.1' diff --git a/requirements/testing/travis_all.txt b/requirements/testing/travis_all.txt index 3f5811b1b778..e76353cb9043 100644 --- a/requirements/testing/travis_all.txt +++ b/requirements/testing/travis_all.txt @@ -8,7 +8,6 @@ pillow pyparsing pytest pytest-cov -pytest-faulthandler pytest-rerunfailures pytest-timeout pytest-xdist