Fix collections deprecation warning

```python
ifcopenshell/geom/occ_utils.py:28ifcopenshell/geom/occ_utils.py:28
  /home/cyril/git/BIMxBEM/ifcopenshell/geom/occ_utils.py:28: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
    from collections import namedtuple, Iterable
```
This commit is contained in:
CyrilWaechter
2020-08-27 00:08:08 +02:00
committed by Thomas Krijnen
parent 8b982df1c0
commit 60147a8ec9
3 changed files with 15 additions and 3 deletions
+5 -1
View File
@@ -25,7 +25,11 @@ import random
import operator
import warnings
from collections import namedtuple, Iterable
from collections import namedtuple
try: # python 3.3+
from collections.abc import Iterable
except ModuleNotFoundError: # python 2
from collections import Iterable
try:
from OCC.Core import TopoDS, gp, Quantity, BRepTools
@@ -11,7 +11,11 @@ import multiprocessing
import OCC.AIS
from collections import defaultdict, Iterable, OrderedDict
from collections import defaultdict, OrderedDict
try: # python 3.3+
from collections.abc import Iterable
except ModuleNotFoundError: # python 2
from collections import Iterable
try:
QString = unicode
@@ -25,7 +25,11 @@ import random
import operator
import warnings
from collections import namedtuple, Iterable
from collections import namedtuple
try: # python 3.3+
from collections.abc import Iterable
except ModuleNotFoundError: # python 2
from collections import Iterable
try:
from OCC.Core import V3d, TopoDS, gp, AIS, Quantity, BRepTools, Graphic3d