src/globus_sdk/exc/warnings.py
raw| 1 | from __future__ import annotations |
| 2 | |
| 3 | import warnings |
| 4 | |
| 5 | |
| 6 | class RemovedInV5Warning(DeprecationWarning): |
| 7 | """ |
| 8 | This warning indicates that a feature or usage was detected which will be |
| 9 | unsupported in globus-sdk version 5. |
| 10 | |
| 11 | Users are encouraged to resolve these warnings when possible. |
| 12 | """ |
| 13 | |
| 14 | |
| 15 | def warn_deprecated(message: str, stacklevel: int = 2) -> None: |
| 16 | warnings.warn(message, RemovedInV5Warning, stacklevel=stacklevel) |