def __init__(
            self, id_reader, field_data=None, mixins=(), services=None,
            default_class=None, select=None, id_generator=None
    ):
        """
        Arguments:
            id_reader (IdReader): An object that allows the `Runtime` to
                map between *usage_ids*, *definition_ids*, and *block_types*.

            id_generator (IdGenerator): The :class:`.IdGenerator` to use
                for creating ids when importing XML or loading XBlockAsides.

            field_data (FieldData): The :class:`.FieldData` to use by default when
                constructing an :class:`.XBlock` from this `Runtime`.

            mixins (tuple): Classes that should be mixed in with every :class:`.XBlock`
                created by this `Runtime`.

            services (dict): Services to make available through the
                :meth:`service` method.  There's no point passing anything here
                if you are overriding :meth:`service` in your sub-class.

            default_class (class): The default class to use if a class can't be found for a
                particular `block_type` when loading an :class:`.XBlock`.

            select: A function to select from one or more :class:`.XBlock` subtypes found
                when calling :meth:`.XBlock.load_class` to resolve a `block_type`.
                This is the same `select` as used by :meth:`.Plugin.load_class`.

        """
        self.id_reader = id_reader
        self._services = services or {}

        # Provide some default implementations
        self._services.setdefault("i18n", NullI18nService())

        self._deprecated_per_instance_field_data = field_data  # pylint: disable=invalid-name
        if field_data:
            warnings.warn(
                "Passing field_data as a constructor argument to Runtimes is deprecated",
                FieldDataDeprecationWarning,
                stacklevel=2
            )
            self._services.setdefault("field-data", field_data)

        self.default_class = default_class
        self.select = select

        self.user_id = None
        self.mixologist = Mixologist(mixins)
        self._view_name = None

        self.id_generator = id_generator
        if id_generator is None:
            warnings.warn("IdGenerator will be required in the future in order to support XBlockAsides", FutureWarning)
def __init__ ( self , id_reader , field_data = None , mixins = ( ) , services = None , default_class = None , select = None , id_generator = None ) : self . id_reader = id_reader self . _services = services or { } self . _services . setdefault ( "i18n" , NullI18nService ( ) ) self . _deprecated_per_instance_field_data = field_data if field_data : warnings . warn ( "Passing field_data as a constructor argument to Runtimes is deprecated" , FieldDataDeprecationWarning , stacklevel = 2 ) self . _services . setdefault ( "field-data" , field_data ) self . default_class = default_class self . select = select self . user_id = None self . mixologist = Mixologist ( mixins ) self . _view_name = None self . id_generator = id_generator if id_generator is None : warnings . warn ( "IdGenerator will be required in the future in order to support XBlockAsides" , FutureWarning )
Arguments:
            id_reader (IdReader): An object that allows the `Runtime` to
                map between *usage_ids*, *definition_ids*, and *block_types*.

            id_generator (IdGenerator): The :class:`.IdGenerator` to use
                for creating ids when importing XML or loading XBlockAsides.

            field_data (FieldData): The :class:`.FieldData` to use by default when
                constructing an :class:`.XBlock` from this `Runtime`.

            mixins (tuple): Classes that should be mixed in with every :class:`.XBlock`
                created by this `Runtime`.

            services (dict): Services to make available through the
                :meth:`service` method.  There's no point passing anything here
                if you are overriding :meth:`service` in your sub-class.

            default_class (class): The default class to use if a class can't be found for a
                particular `block_type` when loading an :class:`.XBlock`.

            select: A function to select from one or more :class:`.XBlock` subtypes found
                when calling :meth:`.XBlock.load_class` to resolve a `block_type`.
                This is the same `select` as used by :meth:`.Plugin.load_class`.