@classmethod
def dict_to_class(cls, data):
    '\n        Recreate an object out of a dict containing the class name and the attributes.\n        Only a fixed set of classes are recognized.\n        '
    from . import core, client, server
    classname = data.get('__class__', '<unknown>')
    if isinstance(classname, bytes):
        classname = classname.decode('utf-8')
    if (classname in cls.__custom_dict_to_class_registry):
        converter = cls.__custom_dict_to_class_registry[classname]
        return converter(classname, data)
    if ('__' in classname):
        raise errors.SecurityError(('refused to deserialize types with double underscores in their name: ' + classname))
    if (classname == 'Pyro5.core.URI'):
        uri = core.URI.__new__(core.URI)
        uri.__setstate__(data['state'])
        return uri
    elif (classname == 'Pyro5.client.Proxy'):
        proxy = client.Proxy.__new__(client.Proxy)
        proxy.__setstate__(data['state'])
        return proxy
    elif (classname == 'Pyro5.server.Daemon'):
        daemon = server.Daemon.__new__(server.Daemon)
        daemon.__setstate__(data['state'])
        return daemon
    elif classname.startswith('Pyro5.util.'):
        if (classname == 'Pyro5.util.SerpentSerializer'):
            return SerpentSerializer()
        elif (classname == 'Pyro5.util.MarshalSerializer'):
            return MarshalSerializer()
        elif (classname == 'Pyro5.util.JsonSerializer'):
            return JsonSerializer()
        elif (classname == 'Pyro5.util.MsgpackSerializer'):
            return MsgpackSerializer()
    elif classname.startswith('Pyro5.errors.'):
        errortype = getattr(errors, classname.split('.', 2)[2])
        if issubclass(errortype, errors.PyroError):
            return SerializerBase.make_exception(errortype, data)
    elif (classname == 'struct.error'):
        return SerializerBase.make_exception(struct.error, data)
    elif (classname == 'Pyro5.core._ExceptionWrapper'):
        ex = data['exception']
        if (isinstance(ex, dict) and ('__class__' in ex)):
            ex = SerializerBase.dict_to_class(ex)
        return core._ExceptionWrapper(ex)
    elif data.get('__exception__', False):
        if (classname in all_exceptions):
            return SerializerBase.make_exception(all_exceptions[classname], data)
        (namespace, short_classname) = classname.split('.', 1)
        if (namespace in ('builtins', 'exceptions')):
            exceptiontype = getattr(builtins, short_classname)
            if issubclass(exceptiontype, BaseException):
                return SerializerBase.make_exception(exceptiontype, data)
        elif ((namespace == 'sqlite3') and short_classname.endswith('Error')):
            import sqlite3
            exceptiontype = getattr(sqlite3, short_classname)
            if issubclass(exceptiontype, BaseException):
                return SerializerBase.make_exception(exceptiontype, data)
    log.warning(('unsupported serialized class: ' + classname))
    raise errors.SerializeError(('unsupported serialized class: ' + classname))
Recreate an object out of a dict containing the class name and the attributes.
Only a fixed set of classes are recognized.
@classmethod
def dict_to_class(cls, data):
    '\n        Recreate an object out of a dict containing the class name and the attributes.\n        Only a fixed set of classes are recognized.\n        '
    from . import core, client, server
    classname = data.get('__class__', '<unknown>')
    if isinstance(classname, bytes):
        classname = classname.decode('utf-8')
    if (classname in cls.__custom_dict_to_class_registry):
        converter = cls.__custom_dict_to_class_registry[classname]
        return converter(classname, data)
    if ('__' in classname):
        raise errors.SecurityError(('refused to deserialize types with double underscores in their name: ' + classname))
    if (classname == 'Pyro5.core.URI'):
        uri = core.URI.__new__(core.URI)
        uri.__setstate__(data['state'])
        return uri
    elif (classname == 'Pyro5.client.Proxy'):
        proxy = client.Proxy.__new__(client.Proxy)
        proxy.__setstate__(data['state'])
        return proxy
    elif (classname == 'Pyro5.server.Daemon'):
        daemon = server.Daemon.__new__(server.Daemon)
        daemon.__setstate__(data['state'])
        return daemon
    elif classname.startswith('Pyro5.util.'):
        if (classname == 'Pyro5.util.SerpentSerializer'):
            return SerpentSerializer()
        elif (classname == 'Pyro5.util.MarshalSerializer'):
            return MarshalSerializer()
        elif (classname == 'Pyro5.util.JsonSerializer'):
            return JsonSerializer()
        elif (classname == 'Pyro5.util.MsgpackSerializer'):
            return MsgpackSerializer()
    elif classname.startswith('Pyro5.errors.'):
        errortype = getattr(errors, classname.split('.', 2)[2])
        if issubclass(errortype, errors.PyroError):
            return SerializerBase.make_exception(errortype, data)
    elif (classname == 'struct.error'):
        return SerializerBase.make_exception(struct.error, data)
    elif (classname == 'Pyro5.core._ExceptionWrapper'):
        ex = data['exception']
        if (isinstance(ex, dict) and ('__class__' in ex)):
            ex = SerializerBase.dict_to_class(ex)
        return core._ExceptionWrapper(ex)
    elif data.get('__exception__', False):
        if (classname in all_exceptions):
            return SerializerBase.make_exception(all_exceptions[classname], data)
        (namespace, short_classname) = classname.split('.', 1)
        if (namespace in ('builtins', 'exceptions')):
            exceptiontype = getattr(builtins, short_classname)
            if issubclass(exceptiontype, BaseException):
                return SerializerBase.make_exception(exceptiontype, data)
        elif ((namespace == 'sqlite3') and short_classname.endswith('Error')):
            import sqlite3
            exceptiontype = getattr(sqlite3, short_classname)
            if issubclass(exceptiontype, BaseException):
                return SerializerBase.make_exception(exceptiontype, data)
    log.warning(('unsupported serialized class: ' + classname))
    raise errors.SerializeError(('unsupported serialized class: ' + classname))