MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / warn_deprecated_limited

Function warn_deprecated_limited

lib/sqlalchemy/util/deprecations.py:63–78  ·  view source on GitHub ↗

Issue a deprecation warning with a parameterized string, limiting the number of registrations.

(
    msg: str,
    args: Sequence[Any],
    version: str,
    stacklevel: int = 3,
    code: Optional[str] = None,
)

Source from the content-addressed store, hash-verified

61
62
63def warn_deprecated_limited(
64 msg: str,
65 args: Sequence[Any],
66 version: str,
67 stacklevel: int = 3,
68 code: Optional[str] = None,
69) -> None:
70 """Issue a deprecation warning with a parameterized string,
71 limiting the number of registrations.
72
73 """
74 if args:
75 msg = _hash_limit_string(msg, 10, args)
76 _warn_with_version(
77 msg, version, exc.SADeprecationWarning, stacklevel, code=code
78 )
79
80
81def deprecated_cls(

Callers 1

Calls 2

_hash_limit_stringClass · 0.85
_warn_with_versionFunction · 0.85

Tested by 1