Commit bb548ed8 authored by Jason Madden's avatar Jason Madden

Add faulthandler.

parent baf9a2a3
......@@ -174,7 +174,7 @@ jobs:
# First, the build dependencies (see setup.cfg)
# so that we don't have to use build isolation and can better use the cache;
# Note that we can't use -U for cffi and greenlet on PyPy.
- &build-gevent-deps pip install -U setuptools wheel twine && pip install -U 'cffi;platform_python_implementation=="CPython"' cython 'greenlet;platform_python_implementation=="CPython"'
- &build-gevent-deps pip install -U setuptools wheel twine && pip install -U 'faulthandler; python_version == "2.7" and platform_python_implementation == "CPython"' 'cffi;platform_python_implementation=="CPython"' cython 'greenlet;platform_python_implementation=="CPython"'
# Next, build the wheel *in place*. This helps ccache, and also lets us cache the configure
# output (pip install uses a random temporary directory, making this difficult)
- python setup.py bdist_wheel
......
......@@ -9,6 +9,9 @@ pylint>=1.8.0 ; python_version < "3.4"
pylint >= 2.5.0 ; python_version >= "3.4" and platform_python_implementation == "CPython"
astroid >= 2.4.0 ; python_version >= "3.4" and platform_python_implementation == "CPython"
# backport of faulthandler
faulthandler ; python_version == "2.7" and platform_python_implementation == "CPython"
# For generating CHANGES.rst
towncrier
# For making releases
......
......@@ -28,10 +28,22 @@ import unittest
# It's important to do this ASAP, because if we're monkey patched,
# then importing things like the standard library test.support can
# need to construct the hub (to check for IPv6 support using a socket).
# We can't do it in the testrunner, as the testrunner spaws new, unrelated
# processes.
from .hub import QuietHub
import gevent.hub
gevent.hub.set_default_hub_class(QuietHub)
try:
import faulthandler
except ImportError:
# The backport isn't installed.
pass
else:
# Enable faulthandler for stack traces. We have to do this here
# for the same reasons as above.
faulthandler.enable()
from .sysinfo import VERBOSE
from .sysinfo import WIN
from .sysinfo import LINUX
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment