xmlstream: do not use the category param to catch_warnings

Added in debian 3.11.
This commit is contained in:
mathieui 2025-02-09 15:52:43 +01:00
parent 04d5c43853
commit 0de9df92c4
No known key found for this signature in database
GPG Key ID: C59F84CEEFD616E3

View File

@ -376,7 +376,7 @@ class XMLStream(asyncio.BaseProtocol):
def loop(self) -> AbstractEventLoop:
if self._loop is None:
try:
with warnings.catch_warnings(category=DeprecationWarning):
with warnings.catch_warnings():
warnings.simplefilter("ignore")
self._loop = asyncio.get_event_loop()
# We do not know what exception will be raised in the future