[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
pull/2516/head
Luis González 2021-05-13 15:05:49 +00:00 committed by prabakaran
parent ab25f50c7b
commit 8e5c37b2aa
1 changed files with 2 additions and 2 deletions

View File

@ -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