# Path: alembic/util/compat.py
# class EncodedIO(io.TextIOWrapper):
#     def close(self) -> None:
# def importlib_metadata_get(group: str) -> Tuple[EntryPoint, ...]:
# def formatannotation_fwdref(annotation, base_module=None):
# 
# Path: alembic/util/compat.py
# class EncodedIO(io.TextIOWrapper):
#     def close(self) -> None:
# def importlib_metadata_get(group: str) -> Tuple[EntryPoint, ...]:
# def formatannotation_fwdref(annotation, base_module=None):


import collections
import textwrap
import uuid
import warnings
from collections.abc import Iterable
from typing import Any
from typing import Callable
from typing import Dict
from typing import List
from typing import Optional
from typing import overload
from typing import Sequence
from typing import Tuple
from typing import TypeVar
from typing import Union
from sqlalchemy.util import asbool  # noqa
from sqlalchemy.util import immutabledict  # noqa
from sqlalchemy.util import memoized_property  # noqa
from sqlalchemy.util import to_list  # noqa
from sqlalchemy.util import unique_list  # noqa
from .compat import inspect_getfullargspec
from .compat import string_types
            cls._add_proxied_attribute(methname, globals_, locals_, attr_names)

    @classmethod
    def _add_proxied_attribute(cls, methname, globals_, locals_, attr_names):
        if not methname.startswith("_"):
            meth = getattr(cls, methname)
            if callable(meth):
                locals_[methname] = cls._create_method_proxy(
                    methname, globals_, locals_
                )
            else:
                attr_names.add(methname)

    @classmethod
    def _create_method_proxy(cls, name, globals_, locals_):
        fn = getattr(cls, name)

        def _name_error(name, from_):
            raise NameError(
                "Can't invoke function '%s', as the proxy object has "
                "not yet been "
                "established for the Alembic '%s' class.  "
                "Try placing this code inside a callable."
                % (name, cls.__name__)
            ) from from_

        globals_["_name_error"] = _name_error

        translations = getattr(fn, "_legacy_translations", [])
        if translations:

# Path: alembic/util/compat.py
# class EncodedIO(io.TextIOWrapper):
#     def close(self) -> None:
# def importlib_metadata_get(group: str) -> Tuple[EntryPoint, ...]:
# def formatannotation_fwdref(annotation, base_module=None):
# 
# Path: alembic/util/compat.py
# class EncodedIO(io.TextIOWrapper):
#     def close(self) -> None:
# def importlib_metadata_get(group: str) -> Tuple[EntryPoint, ...]:
# def formatannotation_fwdref(annotation, base_module=None):


# Path: alembic/util/langhelpers.py
import collections
import textwrap
import uuid
import warnings
from collections.abc import Iterable
from typing import Any
from typing import Callable
from typing import Dict
from typing import List
from typing import Optional
from typing import overload
from typing import Sequence
from typing import Tuple
from typing import TypeVar
from typing import Union
from sqlalchemy.util import asbool  # noqa
from sqlalchemy.util import immutabledict  # noqa
from sqlalchemy.util import memoized_property  # noqa
from sqlalchemy.util import to_list  # noqa
from sqlalchemy.util import unique_list  # noqa
from .compat import inspect_getfullargspec
from .compat import string_types

            cls._add_proxied_attribute(methname, globals_, locals_, attr_names)

    @classmethod
    def _add_proxied_attribute(cls, methname, globals_, locals_, attr_names):
        if not methname.startswith("_"):
            meth = getattr(cls, methname)
            if callable(meth):
                locals_[methname] = cls._create_method_proxy(
                    methname, globals_, locals_
                )
            else:
                attr_names.add(methname)

    @classmethod
    def _create_method_proxy(cls, name, globals_, locals_):
        fn = getattr(cls, name)

        def _name_error(name, from_):
            raise NameError(
                "Can't invoke function '%s', as the proxy object has "
                "not yet been "
                "established for the Alembic '%s' class.  "
                "Try placing this code inside a callable."
                % (name, cls.__name__)
            ) from from_

        globals_["_name_error"] = _name_error

        translations = getattr(fn, "_legacy_translations", [])
        if translations:

            spec = inspect_getfullargspec(fn)