def unpatch(): """ Unpatch any previously patched modules. This operation is idempotent. """ _PATCHED_MODULES.discard('pymysql') unwrap(pymysql, 'connect')
def unpatch(): """ Unpatch any previously patched modules. This operation is idempotent. """ _PATCHED_MODULES.discard('sqlalchemy_core') import sqlalchemy unwrap(sqlalchemy.engine.base.Connection, 'execute')
def unpatch(): """ Unpatch any previously patched modules. This operation is idempotent. """ setattr(httplib, PATCH_FLAG, False) # _send_request encapsulates putrequest, putheader[s], and endheaders unwrap(httplib.HTTPConnection, '_send_request') unwrap(httplib.HTTPConnection, 'getresponse') unwrap(httplib.HTTPResponse, 'read')
def unpatch(): """ unpatch any previously patched modules """ if not getattr(httplib, '__xray_patch', False): return setattr(httplib, '__xray_patch', False) # send_request encapsulates putrequest, putheader[s], and endheaders # NOTE that requests unwrap(httplib.HTTPConnection, '_send_request') unwrap(httplib.HTTPConnection, 'getresponse') unwrap(httplib.HTTPConnection, 'read')