Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def unregister():
"""Unregister the cloudpickle extension.
"""
if CloudPickler.dispatch.get(GeneratorType) is _save_generator:
# make sure we are only removing the dispatch we added, not someone
# else's
del CloudPickler.dispatch[GeneratorType]
if sys.version_info >= (3, 5, 0):
if CloudPickler.dispatch.get(CoroutineType) is _save_coroutine:
del CloudPickler.dispatch[CoroutineType]
if sys.version_info >= (3, 6, 0):
if (CloudPickler.dispatch.get(AsyncGeneratorType) is
_save_async_generator):
del CloudPickler.dispatch[AsyncGeneratorType]
def unregister():
"""Unregister the cloudpickle extension.
"""
if CloudPickler.dispatch.get(GeneratorType) is _save_generator:
# make sure we are only removing the dispatch we added, not someone
# else's
del CloudPickler.dispatch[GeneratorType]
if sys.version_info >= (3, 5, 0):
if CloudPickler.dispatch.get(CoroutineType) is _save_coroutine:
del CloudPickler.dispatch[CoroutineType]
if sys.version_info >= (3, 6, 0):
if (CloudPickler.dispatch.get(AsyncGeneratorType) is
_save_async_generator):
del CloudPickler.dispatch[AsyncGeneratorType]
def unregister():
"""Unregister the cloudpickle extension.
"""
if CloudPickler.dispatch.get(GeneratorType) is _save_generator:
# make sure we are only removing the dispatch we added, not someone
# else's
del CloudPickler.dispatch[GeneratorType]
if sys.version_info >= (3, 5, 0):
if CloudPickler.dispatch.get(CoroutineType) is _save_coroutine:
del CloudPickler.dispatch[CoroutineType]
if sys.version_info >= (3, 6, 0):
if (CloudPickler.dispatch.get(AsyncGeneratorType) is
_save_async_generator):
del CloudPickler.dispatch[AsyncGeneratorType]