How to use the cloudpickle.CloudPickler.dispatch.get function in cloudpickle

To help you get started, we’ve selected a few cloudpickle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github llllllllll / cloudpickle-generators / cloudpickle_generators / __init__.py View on Github external
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]
github llllllllll / cloudpickle-generators / cloudpickle_generators / __init__.py View on Github external
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]
github llllllllll / cloudpickle-generators / cloudpickle_generators / __init__.py View on Github external
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]