diff options
author | shmel1k <shmel1k@ydb.tech> | 2023-11-26 18:16:14 +0300 |
---|---|---|
committer | shmel1k <shmel1k@ydb.tech> | 2023-11-26 18:43:30 +0300 |
commit | b8cf9e88f4c5c64d9406af533d8948deb050d695 (patch) | |
tree | 218eb61fb3c3b96ec08b4d8cdfef383104a87d63 /contrib/python/Twisted/py3/twisted/internet/_deprecate.py | |
parent | 523f645a83a0ec97a0332dbc3863bb354c92a328 (diff) | |
download | ydb-b8cf9e88f4c5c64d9406af533d8948deb050d695.tar.gz |
add kikimr_configure
Diffstat (limited to 'contrib/python/Twisted/py3/twisted/internet/_deprecate.py')
-rw-r--r-- | contrib/python/Twisted/py3/twisted/internet/_deprecate.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/python/Twisted/py3/twisted/internet/_deprecate.py b/contrib/python/Twisted/py3/twisted/internet/_deprecate.py new file mode 100644 index 0000000000..6eb1e3855f --- /dev/null +++ b/contrib/python/Twisted/py3/twisted/internet/_deprecate.py @@ -0,0 +1,25 @@ +""" +Support similar deprecation of several reactors. +""" + +import warnings + +from incremental import Version, getVersionString + +from twisted.python.deprecate import DEPRECATION_WARNING_FORMAT + + +def deprecatedGnomeReactor(name: str, version: Version) -> None: + """ + Emit a deprecation warning about a gnome-related reactor. + + @param name: The name of the reactor. For example, C{"gtk2reactor"}. + + @param version: The version in which the deprecation was introduced. + """ + stem = DEPRECATION_WARNING_FORMAT % { + "fqpn": "twisted.internet." + name, + "version": getVersionString(version), + } + msg = stem + ". Please use twisted.internet.gireactor instead." + warnings.warn(msg, category=DeprecationWarning) |