devel/py-attrdict: fix build for python >= 3.10

Replace `from collections import` by `from collections.abc import`
This commit is contained in:
Loïc Bartoletti 2022-12-07 08:06:22 +01:00
parent 33a6bcb2a7
commit 0a62917da8
5 changed files with 45 additions and 0 deletions

View file

@ -1,5 +1,6 @@
PORTNAME= attrdict
DISTVERSION= 2.0.1
PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

View file

@ -0,0 +1,11 @@
--- attrdict/default.py.orig 2019-02-01 22:18:30 UTC
+++ attrdict/default.py
@@ -1,7 +1,7 @@
"""
A subclass of MutableAttr that has defaultdict support.
"""
-from collections import Mapping
+from collections.abc import Mapping
import six

View file

@ -0,0 +1,11 @@
--- attrdict/mapping.py.orig 2022-12-06 06:58:43 UTC
+++ attrdict/mapping.py
@@ -1,7 +1,7 @@
"""
An implementation of MutableAttr.
"""
-from collections import Mapping
+from collections.abc import Mapping
import six

View file

@ -0,0 +1,11 @@
--- attrdict/merge.py.orig 2019-02-01 22:18:30 UTC
+++ attrdict/merge.py
@@ -1,7 +1,7 @@
"""
A right-favoring Mapping merge.
"""
-from collections import Mapping
+from collections.abc import Mapping
__all__ = ['merge']

View file

@ -0,0 +1,11 @@
--- attrdict/mixins.py.orig 2019-02-01 22:18:30 UTC
+++ attrdict/mixins.py
@@ -2,7 +2,7 @@
Mixin Classes for Attr-support.
"""
from abc import ABCMeta, abstractmethod
-from collections import Mapping, MutableMapping, Sequence
+from collections.abc import Mapping, MutableMapping, Sequence
import re
import six