Commit 4e76c410 authored by Jason Madden's avatar Jason Madden

One more stab at fixing test__signal.

It appears the gevent.signal module is not the source of the problem.
parent a8ad3b7e
......@@ -82,24 +82,9 @@ from gevent import signal as _signal_module
class _signal_metaclass(type):
def __getattr__(cls, name):
val = getattr(_signal_module, name)
if name == '__cached__' and val is None:
# In 3.6b1 on Travis, the signal module's
# __cached__ is somehow None, which breaks
# reloading because os.path.abspath blows up on None.
# It gracefully handles an AttributeError, though.
raise AttributeError(name)
if name == '__cached__':
print("Returning", val, 'for __cached__ on', _signal_module)
return val
return getattr(_signal_module, name)
def __setattr__(cls, name, value):
# For symmetry with getattr and dir, pass all
# attribute setting on to the module. (This makes
# reloading work, see issue #805)
if name in ('__cached__', '__file__'):
# Py 3.6 issue
return
setattr(_signal_module, name, value)
def __instancecheck__(cls, instance):
......
......@@ -67,8 +67,17 @@ if hasattr(signal, 'SIGALRM'):
# builtin on py2
reload_module = reload # pylint:disable=undefined-variable
reload_module(site)
try:
reload_module(site)
except TypeError:
assert greentest.PY36
assert greentest.RUNNING_ON_CI
for m in set(sys.modules.values()):
try:
if m.__cached__ is None:
print("Module has None __cached__", m)
except AttributeError:
continue
if __name__ == '__main__':
greentest.main()
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