mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
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:
committed by
Thomas Krijnen
parent
8b982df1c0
commit
60147a8ec9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user