From bcb4495c6d9aee6690ff23a1dc64a32abef410c9 Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 15 Feb 2022 21:57:49 +0100 Subject: deprecate XMLStream.process() --- slixmpp/xmlstream/xmlstream.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py index 82611bfd..67238cc6 100644 --- a/slixmpp/xmlstream/xmlstream.py +++ b/slixmpp/xmlstream/xmlstream.py @@ -32,8 +32,9 @@ import functools import logging import socket as Socket import ssl -import weakref import uuid +import warnings +import weakref from contextlib import contextmanager import xml.etree.ElementTree as ET @@ -508,7 +509,17 @@ class XMLStream(asyncio.BaseProtocol): timers, handling signal events, etc). If timeout is None, this function will run forever. If timeout is a number, this function will return after the given time in seconds. + + Will be removed in slixmpp 1.9.0 + + :deprecated: 1.8.0 """ + warnings.warn( + 'This function will be removed in slixmpp 1.9 and above.' + ' Use the asyncio normal functions instead.', + category=DeprecationWarning, + stacklevel=2, + ) if timeout is None: if forever: self.loop.run_forever() -- cgit v1.2.3