Skip to content

Commit 479cda2

Browse files
Update traits.py for collections deprecation warning
\site-packages\pythreejs\traits.py:4 C:\Users\genevieb\AppData\Local\conda\conda\envs\ipyvolume-dev\lib\site-packages\pythreejs\traits.py:4: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import namedtuple, Sequence
1 parent 462efa8 commit 479cda2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pythreejs/traits.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

4-
from collections import namedtuple, Sequence
4+
from collections import namedtuple
5+
try:
6+
from collections.abc import Sequence # python3
7+
except ImportError:
8+
from collections import Sequence # python2
59
import six
610
import re
711
import warnings

0 commit comments

Comments
 (0)