# Path: pytablereader/_constant.py
# class Default:
#     ENCODING = "utf-8"
# 
# Path: pytablereader/error.py
# class LoaderNotFoundError(Exception):
#     """
#     Exception raised when loader not found.
#     """


import abc
import warnings
from mbstrdecoder import MultiByteStrDecoder
from .._constant import Default
from ..error import LoaderNotFoundError

    def get_extension_list(self):
        warnings.warn("'get_extension_list' has moved to 'get_extensions'", DeprecationWarning)
        return self.get_extensions()

    def _get_loader_class(self, loader_mapping, format_name):
        try:
            format_name = format_name.casefold()
        except AttributeError:
            raise TypeError("format name must be a string")

        try:
            return loader_mapping[format_name]
        except KeyError:
            raise LoaderNotFoundError(
                ", ".join(
                    [
                        f"loader not found: format='{format_name}'",
                        f"source='{self.source}'",
                    ]
                )
            )

    def _create_from_extension(self, extension):
        try:
            loader = self._get_loader_class(self._get_extension_loader_mapping(), extension)(
                self.source
            )

            return self._post_create(loader, extension=extension)

# Path: pytablereader/_constant.py
# class Default:
#     ENCODING = "utf-8"
# 
# Path: pytablereader/error.py
# class LoaderNotFoundError(Exception):
#     """
#     Exception raised when loader not found.
#     """


# Path: pytablereader/factory/_base.py
import abc
import warnings
from mbstrdecoder import MultiByteStrDecoder
from .._constant import Default
from ..error import LoaderNotFoundError


    def get_extension_list(self):
        warnings.warn("'get_extension_list' has moved to 'get_extensions'", DeprecationWarning)
        return self.get_extensions()

    def _get_loader_class(self, loader_mapping, format_name):
        try:
            format_name = format_name.casefold()
        except AttributeError:
            raise TypeError("format name must be a string")

        try:
            return loader_mapping[format_name]
        except KeyError:
            raise LoaderNotFoundError(
                ", ".join(
                    [
                        f"loader not found: format='{format_name}'",
                        f"source='{self.source}'",
                    ]
                )
            )

    def _create_from_extension(self, extension):
        try:
            loader = self._get_loader_class(self._get_extension_loader_mapping(), extension)(
                self.source
            )

            return self._post_create(loader, extension=extension)

        except LoaderNotFoundError as e: