$21 GRAYBYTE WORDPRESS FILE MANAGER $74

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.162.162 | ADMIN IP 216.73.217.100
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cloudlinux/venv/lib/python3.11/site-packages/alembic/util/

HOME
Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/alembic/util//compat.py
from __future__ import annotations

import io
import os
import sys
import typing
from typing import Sequence

from sqlalchemy.util import inspect_getfullargspec  # noqa
from sqlalchemy.util.compat import inspect_formatargspec  # noqa

is_posix = os.name == "posix"

py311 = sys.version_info >= (3, 11)
py39 = sys.version_info >= (3, 9)
py38 = sys.version_info >= (3, 8)


# produce a wrapper that allows encoded text to stream
# into a given buffer, but doesn't close it.
# not sure of a more idiomatic approach to this.
class EncodedIO(io.TextIOWrapper):
    def close(self) -> None:
        pass


if py39:
    from importlib import resources as importlib_resources
    from importlib import metadata as importlib_metadata
    from importlib.metadata import EntryPoint
else:
    import importlib_resources  # type:ignore # noqa
    import importlib_metadata  # type:ignore # noqa
    from importlib_metadata import EntryPoint  # type:ignore # noqa


def importlib_metadata_get(group: str) -> Sequence[EntryPoint]:
    ep = importlib_metadata.entry_points()
    if hasattr(ep, "select"):
        return ep.select(group=group)  # type: ignore
    else:
        return ep.get(group, ())  # type: ignore


def formatannotation_fwdref(annotation, base_module=None):
    """vendored from python 3.7"""
    # copied over _formatannotation from sqlalchemy 2.0

    if isinstance(annotation, str):
        return annotation

    if getattr(annotation, "__module__", None) == "typing":
        return repr(annotation).replace("typing.", "").replace("~", "")
    if isinstance(annotation, type):
        if annotation.__module__ in ("builtins", base_module):
            return repr(annotation.__qualname__)
        return annotation.__module__ + "." + annotation.__qualname__
    elif isinstance(annotation, typing.TypeVar):
        return repr(annotation).replace("~", "")
    return repr(annotation).replace("~", "")


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
11 Feb 2026 9.30 AM
root / root
0755
__pycache__
--
11 Feb 2026 9.30 AM
root / root
0755
__init__.py
1.174 KB
20 Jan 2026 1.01 PM
root / root
0644
compat.py
1.866 KB
20 Jan 2026 1.01 PM
root / root
0644
editor.py
2.486 KB
20 Jan 2026 1.01 PM
root / root
0644
exc.py
0.096 KB
20 Jan 2026 1.01 PM
root / root
0644
langhelpers.py
8.391 KB
20 Jan 2026 1.01 PM
root / root
0644
messaging.py
2.971 KB
20 Jan 2026 1.01 PM
root / root
0644
pyfiles.py
3.295 KB
20 Jan 2026 1.01 PM
root / root
0644
sqla_compat.py
17.297 KB
20 Jan 2026 1.01 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF