55 lines
1.5 KiB
Diff
55 lines
1.5 KiB
Diff
|
|
From 354070ebb7b53becbb38ecdbb669e149d76a8805 Mon Sep 17 00:00:00 2001
|
||
|
|
From: desert-sailor <dxwangk@isoftstone.com>
|
||
|
|
Date: Mon, 3 Jul 2023 04:38:39 +0800
|
||
|
|
Subject: [PATCH 2/3] import Sequence and Mapping from collections.abc
|
||
|
|
|
||
|
|
---
|
||
|
|
stuf/_core.py | 2 +-
|
||
|
|
stuf/base.py | 2 +-
|
||
|
|
stuf/core.py | 3 ++-
|
||
|
|
3 files changed, 4 insertions(+), 3 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/stuf/_core.py b/stuf/_core.py
|
||
|
|
index 1c3b83a..f1fb86a 100644
|
||
|
|
--- a/stuf/_core.py
|
||
|
|
+++ b/stuf/_core.py
|
||
|
|
@@ -2,7 +2,7 @@
|
||
|
|
'''some core stuf.'''
|
||
|
|
|
||
|
|
from itertools import chain
|
||
|
|
-from collections import MutableMapping
|
||
|
|
+from collections.abc import MutableMapping
|
||
|
|
from operator import methodcaller, attrgetter
|
||
|
|
|
||
|
|
from .desc import lazy_class, lazy
|
||
|
|
diff --git a/stuf/base.py b/stuf/base.py
|
||
|
|
index 00e6098..e87bad7 100644
|
||
|
|
--- a/stuf/base.py
|
||
|
|
+++ b/stuf/base.py
|
||
|
|
@@ -7,7 +7,7 @@ from keyword import iskeyword
|
||
|
|
from operator import itemgetter
|
||
|
|
from unicodedata import normalize
|
||
|
|
from importlib import import_module
|
||
|
|
-from collections import Sequence, Mapping
|
||
|
|
+from collections.abc import Sequence, Mapping
|
||
|
|
|
||
|
|
# one frame
|
||
|
|
one = lambda a, b: a(b)
|
||
|
|
diff --git a/stuf/core.py b/stuf/core.py
|
||
|
|
index 547b44f..35c47ba 100644
|
||
|
|
--- a/stuf/core.py
|
||
|
|
+++ b/stuf/core.py
|
||
|
|
@@ -2,7 +2,8 @@
|
||
|
|
'''core stuf.'''
|
||
|
|
|
||
|
|
from itertools import chain
|
||
|
|
-from collections import Mapping, defaultdict, namedtuple
|
||
|
|
+from collections.abc import Mapping
|
||
|
|
+from collections import defaultdict, namedtuple
|
||
|
|
|
||
|
|
from ._core import basewrite, writestuf, writewrapstuf, wraps, wrapstuf, asdict
|
||
|
|
|
||
|
|
--
|
||
|
|
2.33.0
|
||
|
|
|