You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by di...@apache.org on 2023/03/08 02:31:37 UTC

[allura] 01/04: [#8503] deprecation warnings - fixed using collections instead of collections.abc

This is an automated email from the ASF dual-hosted git repository.

dill0wn pushed a commit to branch dw/8503
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 669703eee3767bc2d353f650532bcb5d86520e75
Author: Dillon Walls <di...@slashdotmedia.com>
AuthorDate: Wed Mar 8 02:15:39 2023 +0000

    [#8503] deprecation warnings - fixed using collections instead of collections.abc
---
 Allura/allura/lib/utils.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Allura/allura/lib/utils.py b/Allura/allura/lib/utils.py
index 396ad7ccf..c1c27e118 100644
--- a/Allura/allura/lib/utils.py
+++ b/Allura/allura/lib/utils.py
@@ -17,7 +17,7 @@
 from __future__ import annotations
 
 import base64
-from collections.abc import Iterable
+from collections.abc import Iterable, Mapping, MutableMapping
 from contextlib import contextmanager
 import time
 import string
@@ -421,7 +421,7 @@ class TruthyCallable:
             return NotImplemented
 
 
-class TransformedDict(collections.MutableMapping):
+class TransformedDict(MutableMapping):
 
     """
     A dictionary which applies an arbitrary
@@ -807,7 +807,7 @@ def smart_str(s):
 
 
 def generate_smart_str(params):
-    if isinstance(params, collections.Mapping):
+    if isinstance(params, Mapping):
         params_list = params.items()
     else:
         params_list = params