From 13a59dc38e07a03a434fdf0b20909a6c6d75bf6c Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 30 May 2022 13:35:10 +0200 Subject: [PATCH] misc: import Mapping from collections.abc (#65764) --- passerelle/base/models.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/passerelle/base/models.py b/passerelle/base/models.py index 472ac4ce..a2bad939 100644 --- a/passerelle/base/models.py +++ b/passerelle/base/models.py @@ -1,5 +1,5 @@ import base64 -import collections +import collections.abc import copy import datetime import inspect @@ -960,7 +960,12 @@ class ProxyLogger: rl_message = message rl_args = args # Borrowed from python stdlib logging/__init__.py - if rl_args and len(rl_args) == 1 and isinstance(rl_args[0], collections.Mapping) and rl_args[0]: + if ( + rl_args + and len(rl_args) == 1 + and isinstance(rl_args[0], collections.abc.Mapping) + and rl_args[0] + ): rl_args = rl_args[0] # End Borrow if rl_args: -- 2.35.1