Commit e8d48e98 authored by Denis Bilenko's avatar Denis Bilenko

monkey: module.__target__, if present, now specifies the module to monkey patch

parent 8f68b30e
......@@ -74,8 +74,9 @@ class original(object):
def patch_module(name, items=None):
dest = __import__(name)
source = getattr(__import__('gevent.' + name), name)
target = getattr(source, '__target__', name)
dest = __import__(target)
monkey_original = dest.monkey_original = original()
count = 0
if items is None:
......
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