MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _warn_with_version

Function _warn_with_version

lib/sqlalchemy/util/deprecations.py:42–52  ·  view source on GitHub ↗
(
    msg: str,
    version: str,
    type_: Type[exc.SADeprecationWarning],
    stacklevel: int,
    code: Optional[str] = None,
)

Source from the content-addressed store, hash-verified

40
41
42def _warn_with_version(
43 msg: str,
44 version: str,
45 type_: Type[exc.SADeprecationWarning],
46 stacklevel: int,
47 code: Optional[str] = None,
48) -> None:
49 warn = type_(msg, code=code)
50 warn.deprecated_since = version
51
52 _warnings_warn(warn, stacklevel=stacklevel + 1)
53
54
55def warn_deprecated(

Callers 4

warn_deprecatedFunction · 0.85
warn_deprecated_limitedFunction · 0.85
warnedFunction · 0.85
_decorate_with_warningFunction · 0.85

Calls 1

_warnings_warnFunction · 0.85

Tested by

no test coverage detected