File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ from types cimport *
9
9
from libc.stdint cimport uintptr_t
10
10
from libc.stdlib cimport malloc, free
11
11
12
+ try :
13
+ from collections import Sequence
14
+ except ImportError :
15
+ # >= py3.10 moved everything into top-level "abc" module
16
+ # https://docs.python.org/3.9/library/collections.html
17
+ from collections.abc import Sequence
18
+
12
19
13
20
@cython.internal
14
21
cdef class NVList(object ):
@@ -247,7 +254,7 @@ cdef class NVList(object):
247
254
nvpair.nvlist_add_nvlist(self .handle, key, cnvlist.handle)
248
255
return
249
256
250
- if isinstance (value, collections. Sequence):
257
+ if isinstance (value, Sequence):
251
258
if typeid == nvpair.DATA_TYPE_STRING_ARRAY:
252
259
carray = malloc(len (value) * sizeof(char * ))
253
260
for idx, i in enumerate (value):
You can’t perform that action at this time.
0 commit comments