From f65e53fe13b6f3e68e9c8e556fb140f39985b972 Mon Sep 17 00:00:00 2001 From: jaywandery <49345820+josephwandery@users.noreply.github.com> Date: Mon, 3 Mar 2025 09:05:57 +0300 Subject: [PATCH] Fixed collections.Mapping deprecation issue Exiting: module 'collections' has no attribute 'Mapping' -- fixed --- core/plugin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/plugin.py b/core/plugin.py index 92127fc..bf4fa1d 100644 --- a/core/plugin.py +++ b/core/plugin.py @@ -4,12 +4,12 @@ from utils.strings import chunkit, md5 from utils import rand from utils.loggers import log -import collections +import collections.abc import re import itertools import base64 import datetime -import collections +import collections.abc import threading import time import utils.config @@ -18,8 +18,8 @@ def _recursive_update(d, u): # Update value of a nested dictionary of varying depth for k, v in u.items(): - if isinstance(d, collections.Mapping): - if isinstance(v, collections.Mapping): + if isinstance(d, collections.abc.Mapping): + if isinstance(v, collections.abc.Mapping): r = _recursive_update(d.get(k, {}), v) d[k] = r else: