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,
)
| 61 | |
| 62 | |
| 63 | def 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 | |
| 81 | def deprecated_cls( |