1) 在文件中 "__init__", 注释掉:
from sets import ImmutableSet
class DBAPISet(ImmutableSet):
新增:
class DBAPISet(frozenset):
2) 在文件中"converters.py", 注释掉 from sets import BaseSet, Set 这一句话。
3) 在文件中"converters.py", 修改 "Set" 成为 "set" ( 只有两个地方需要修改):
大概 line 48: return Set([ i for i in s.split(',') if i ]) 》》 return set([ i for i in s.split(',') if i ])
大概 line 128: Set: Set2Str, 》》 set: Set2Str
另外英文原版说明如下:
1) file "__init__", replace:
from sets import ImmutableSet
class DBAPISet(ImmutableSet):
with
class DBAPISet(frozenset)
2) file "converters.py", remove:
from sets import BaseSet, Set
3) file "converters.py", change "Set" by "set" (IMPORTANT: only two places):
line 48: return set([ i for i in s.split(',') if i ])
line 128: set: Set2Str,