The current imported serialization handler module.

        :return: The imported handler
        :rtype: module
420513
def handler(self):
        

        if not hasattr(self, "_handler"):
            self._handler = sys.modules[self.imported]
        return self._handler
238418
def exception_handler(self, callback):
        
        path = '.'.join([callback.__module__, callback.__name__])
        self._exception_handlers.append(path)
        return callback
1273601
def _get_handler(self, handler_class):
        """"""
        element = None
        for handler in self.handlers:
            if isinstance(handler, handler_class):
                element = handler
                break
        return element
1284985
def _patch_static_handler(handler):
    

    if django.VERSION[:2] < (1, 3):
        return

    from django.contrib.staticfiles.handlers import StaticFilesHandler
    return StaticFilesHandler(handler)
1104065
def _import_serializer_class(self, location):
        
        pieces = location.split(".")
        class_name = pieces.pop()

        if pieces[len(pieces) - 1] != "serializers":
            pieces.append("serializers")

        module = importlib.import_module(".".join(pieces))
        return getattr(module, class_name)
1191989
def get_imported_module(self, context):
        
        if self.level == 0:
            return context.project.get_module(
                self.module_name, context.folder)
        else:
            return context.project.get_relative_module(
                self.module_name, context.folder, self.level)
194242
def create_data_and_metadata_io_handler(self, io_handler_delegate):
        
        class DelegateIOHandler(ImportExportManager.ImportExportHandler):
            def __init__(self):
                super().__init__(io_handler_delegate.io_handler_id, io_handler_delegate.io_handler_name, io_handler_delegate.io_handler_extensions)

            def read_data_elements(self, ui, extension, file_path):
                data_and_metadata = io_handler_delegate.read_data_and_metadata(extension, file_path)
                data_element = ImportExportManager.create_data_element_from_extended_data(data_and_metadata)
                return [data_element]

            def can_write(self, data_and_metadata, extension):
                return io_handler_delegate.can_write_data_and_metadata(data_and_metadata, extension)

            def write_display_item(self, ui, display_item: DisplayItemModule.DisplayItem, file_path: str, extension: str) -> None:
                data_item = display_item.data_item
                if data_item:
                    self.write_data_item(ui, data_item, file_path, extension)

            def write_data_item(self, ui, data_item, file_path, extension):
                data_and_metadata = data_item.xdata
                data = data_and_metadata.data
                if data is not None:
                    if hasattr(io_handler_delegate, "write_data_item"):
                        io_handler_delegate.write_data_item(DataItem(data_item), file_path, extension)
                    else:
                        assert hasattr(io_handler_delegate, "write_data_and_metadata")
                        io_handler_delegate.write_data_and_metadata(data_and_metadata, file_path, extension)

        class IOHandlerReference:

            def __init__(self):
                self.__io_handler_delegate = io_handler_delegate
                self.__io_handler = DelegateIOHandler()
                ImportExportManager.ImportExportManager().register_io_handler(self.__io_handler)

            def __del__(self):
                self.close()

            def close(self):
                if self.__io_handler_delegate:
                    io_handler_delegate_close_fn = getattr(self.__io_handler_delegate, "close", None)
                    if io_handler_delegate_close_fn:
                       io_handler_delegate_close_fn()
                    ImportExportManager.ImportExportManager().unregister_io_handler(self.__io_handler)
                    self.__io_handler_delegate = None

        return IOHandlerReference()
1123151
def serialize(exc):
    

    return {
        'exc_type': type(exc).__name__,
        'exc_path': get_module_path(type(exc)),
        'exc_args': list(map(safe_for_serialization, exc.args)),
        'value': safe_for_serialization(exc),
    }
1068684
def patch_loader(*decorator_args, serializer):
    
    def wrapped(fn):
        @wraps(fn)
        def decorated(*args, **kwargs):
            result = serializer.load(request.get_json(),
                                     instance=kwargs.pop('instance'),
                                     partial=True)
            if not result.errors and not result.data.id:
                abort(HTTPStatus.NOT_FOUND)
            return fn(*result)
        return decorated

    if decorator_args and callable(decorator_args[0]):
        return wrapped(decorator_args[0])
    return wrapped
900307
def _registerHandler(self, handler):
        
        self._logger.addHandler(handler)
        self._handlers.append(handler)
601796
def handler(self, handler_class):
        """"""
        self.handler_class = handler_class
        # we take the docstring from the handler class, not the methods
        if self.docs is None and handler_class.__doc__:
            self.docs = clean_docstring(handler_class.__doc__)
        return handler_class
315157
def patch_python_logging_handlers():
    '''
    
    '''
    logging.StreamHandler = StreamHandler
    logging.FileHandler = FileHandler
    logging.handlers.SysLogHandler = SysLogHandler
    logging.handlers.WatchedFileHandler = WatchedFileHandler
    logging.handlers.RotatingFileHandler = RotatingFileHandler
    if sys.version_info >= (3, 2):
        logging.handlers.QueueHandler = QueueHandler
336413
def return_handler(module_logger, first_is_session=True):
    

    def _outer(visa_library_method):

        def _inner(self, session, *args, **kwargs):

            ret_value = visa_library_method(*args, **kwargs)
            module_logger.debug('%s%s -> %r',
                                visa_library_method.__name__,
                                _args_to_str(args, kwargs),
                                ret_value)

            try:
                ret_value = constants.StatusCode(ret_value)
            except ValueError:
                pass

            if first_is_session:
                self._last_status = ret_value
                self._last_status_in_session[session] = ret_value

            if ret_value < 0:
                raise VisaIOError(ret_value)

            if ret_value in self.issue_warning_on:
                if session and ret_value not in self._ignore_warning_in_session[session]:
                    module_logger.warn(VisaIOWarning(ret_value), stacklevel=2)

            return ret_value

        return _inner

    return _outer
175290
def start_import(self, version_id=None):
        
        if not version_id:
            version_id = self.version.id

        target_url = self._client.get_url('VERSION', 'POST', 'import', {'layer_id': self.id, 'version_id': version_id})
        r = self._client.request('POST', target_url, json={})
        return self._deserialize(r.json(), self._manager)
1230612
private void handleSerialFactory()
    {

        String serialProvider = _externalContext.getInitParameter(StateUtils.SERIAL_FACTORY);
        SerialFactory serialFactory = null;

        if (serialProvider == null)
        {
            serialFactory = new DefaultSerialFactory();
        }
        else
        {
            try
            {
                serialFactory = (SerialFactory) ClassUtils.newInstance(serialProvider);

            }
            catch (ClassCastException e)
            {
                log.log(Level.SEVERE, "Make sure '" + serialProvider + "' implements the correct interface", e);
            }
            catch (Exception e)
            {
                log.log(Level.SEVERE, "", e);
            }
            finally
            {
                if (serialFactory == null)
                {
                    serialFactory = new DefaultSerialFactory();
                    log.severe("Using default serialization provider");
                }
            }

        }

        log.info("Serialization provider : " + serialFactory.getClass());
        _externalContext.getApplicationMap().put(StateUtils.SERIAL_FACTORY, serialFactory);
    }
94056
def get_serializer(self, *args, **kwargs):
        
        serializer_class = self.get_serializer_class()
        kwargs['context'] = self.get_serializer_context()
        return serializer_class(*args, **kwargs)
328938
def handle(self, handler):
        
        with self._hlock:
            self._handler_list.append(handler)
        return self