1 diff --git a/eventlet/hubs/hub.py b/eventlet/hubs/hub.py
2 index db55958..c27b81f 100644
3 --- a/eventlet/hubs/hub.py
4 +++ b/eventlet/hubs/hub.py
5 @@ -21,7 +21,7 @@ else:
8 from eventlet.hubs import timer
9 -from eventlet.support import greenlets as greenlet, clear_sys_exc_info
10 +from eventlet.support import greenlets as greenlet
12 from monotonic import monotonic
14 @@ -309,7 +309,6 @@ class BaseHub(object):
15 cur.parent = self.greenlet
17 pass # gets raised if there is a greenlet parent cycle
18 - clear_sys_exc_info()
19 return self.greenlet.switch()
21 def squelch_exception(self, fileno, exc_info):
22 @@ -397,13 +396,11 @@ class BaseHub(object):
23 if self.debug_exceptions:
24 traceback.print_exception(*exc_info)
26 - clear_sys_exc_info()
28 def squelch_timer_exception(self, timer, exc_info):
29 if self.debug_exceptions:
30 traceback.print_exception(*exc_info)
32 - clear_sys_exc_info()
34 def add_timer(self, timer):
35 scheduled_time = self.clock() + timer.seconds
36 @@ -478,7 +475,6 @@ class BaseHub(object):
39 self.squelch_timer_exception(timer, sys.exc_info())
40 - clear_sys_exc_info()
44 diff --git a/eventlet/hubs/kqueue.py b/eventlet/hubs/kqueue.py
45 index bad4a87..8438805 100644
46 --- a/eventlet/hubs/kqueue.py
47 +++ b/eventlet/hubs/kqueue.py
48 @@ -109,4 +109,3 @@ class Hub(hub.BaseHub):
51 self.squelch_exception(fileno, sys.exc_info())
52 - support.clear_sys_exc_info()
53 diff --git a/eventlet/hubs/poll.py b/eventlet/hubs/poll.py
54 index 1bbd401..d3f9c6a 100644
55 --- a/eventlet/hubs/poll.py
56 +++ b/eventlet/hubs/poll.py
57 @@ -113,7 +113,6 @@ class Hub(hub.BaseHub):
60 self.squelch_exception(fileno, sys.exc_info())
61 - support.clear_sys_exc_info()
63 if self.debug_blocking:
64 self.block_detect_post()
65 diff --git a/eventlet/hubs/selects.py b/eventlet/hubs/selects.py
66 index 0ead5b8..0386a1e 100644
67 --- a/eventlet/hubs/selects.py
68 +++ b/eventlet/hubs/selects.py
69 @@ -61,4 +61,3 @@ class Hub(hub.BaseHub):
72 self.squelch_exception(fileno, sys.exc_info())
73 - support.clear_sys_exc_info()
74 diff --git a/eventlet/support/__init__.py b/eventlet/support/__init__.py
75 index 43bac91..b1c1607 100644
76 --- a/eventlet/support/__init__.py
77 +++ b/eventlet/support/__init__.py
78 @@ -30,15 +30,6 @@ def get_errno(exc):
82 -if sys.version_info[0] < 3 and not greenlets.preserves_excinfo:
83 - from sys import exc_clear as clear_sys_exc_info
85 - def clear_sys_exc_info():
87 - Exception information is not visible outside of except statements.
88 - sys.exc_clear became obsolete and removed."""
91 if sys.version_info[0] < 3:
92 def bytes_to_str(b, encoding='ascii'):
94 diff --git a/eventlet/support/greenlets.py b/eventlet/support/greenlets.py
95 index d4e1793..b939328 100644
96 --- a/eventlet/support/greenlets.py
97 +++ b/eventlet/support/greenlets.py
99 -import distutils.version
102 getcurrent = greenlet.greenlet.getcurrent
103 GreenletExit = greenlet.greenlet.GreenletExit
104 -preserves_excinfo = (distutils.version.LooseVersion(greenlet.__version__)
105 - >= distutils.version.LooseVersion('0.3.2'))
106 greenlet = greenlet.greenlet
107 diff --git a/setup.py b/setup.py
108 index a8f4684..9b927e0 100644
111 @@ -19,7 +19,7 @@ setuptools.setup(
112 packages=setuptools.find_packages(exclude=['benchmarks', 'tests', 'tests.*']),
114 'dnspython >= 1.15.0',
117 'monotonic >= 1.4;python_version<"3.5"',
120 diff --git a/tests/hub_test.py b/tests/hub_test.py
121 index a531b75..05c0024 100644
122 --- a/tests/hub_test.py
123 +++ b/tests/hub_test.py
124 @@ -194,7 +194,6 @@ class TestExceptionInMainloop(tests.LimitedTestCase):
126 class TestExceptionInGreenthread(tests.LimitedTestCase):
128 - @skip_unless(greenlets.preserves_excinfo)
129 def test_exceptionpreservation(self):
130 # events for controlling execution order
131 gt1event = eventlet.Event()
132 diff --git a/tests/test__refcount.py b/tests/test__refcount.py
133 index 1090a1f..5c1c002 100644
134 --- a/tests/test__refcount.py
135 +++ b/tests/test__refcount.py
136 @@ -57,7 +57,6 @@ def run_interaction(run_client):
138 def run_and_check(run_client):
139 w = run_interaction(run_client=run_client)
140 - # clear_sys_exc_info()
143 print('run_and_check: weakref fd:', fd)