From 8e5c37b2aa2551091b8505c3a728c6c243008761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Gonz=C3=A1lez?= Date: Thu, 13 May 2021 15:05:49 +0000 Subject: [PATCH] [FIX] sentry: Warning when using classes from collections.abc The following warning is fixed: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working --- sentry/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sentry/__init__.py b/sentry/__init__.py index ccee682e4..20516b970 100644 --- a/sentry/__init__.py +++ b/sentry/__init__.py @@ -9,7 +9,7 @@ from odoo.tools import config as odoo_config from . import const from .logutils import LoggerNameFilter, OdooSentryHandler -import collections +from collections import abc _logger = logging.getLogger(__name__) HAS_RAVEN = True @@ -53,7 +53,7 @@ def initialize_raven(config, client_cls=None): } for option in const.get_sentry_options(): value = config.get("sentry_%s" % option.key, option.default) - if isinstance(option.converter, collections.Callable): + if isinstance(option.converter, abc.Callable): value = option.converter(value) options[option.key] = value