Commit a8ad3b7e authored by Jason Madden's avatar Jason Madden

debugging __cached__ in test_signal.

parent 92a55f75
...@@ -89,12 +89,17 @@ class _signal_metaclass(type): ...@@ -89,12 +89,17 @@ class _signal_metaclass(type):
# reloading because os.path.abspath blows up on None. # reloading because os.path.abspath blows up on None.
# It gracefully handles an AttributeError, though. # It gracefully handles an AttributeError, though.
raise AttributeError(name) raise AttributeError(name)
if name == '__cached__':
print("Returning", val, 'for __cached__ on', _signal_module)
return val return val
def __setattr__(cls, name, value): def __setattr__(cls, name, value):
# For symmetry with getattr and dir, pass all # For symmetry with getattr and dir, pass all
# attribute setting on to the module. (This makes # attribute setting on to the module. (This makes
# reloading work, see issue #805) # reloading work, see issue #805)
if name in ('__cached__', '__file__'):
# Py 3.6 issue
return
setattr(_signal_module, name, value) setattr(_signal_module, name, value)
def __instancecheck__(cls, instance): def __instancecheck__(cls, instance):
......
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