[PEAK] Re: Trellis + Python 2.6
Sergey Schetinin
maluke at gmail.com
Thu Nov 20 10:13:36 EST 2008
After thinking about it again, I see how pointless porting to
MutableSet is. Just overriding the warning is enough.
if sys.version >= '2.6':
import warnings
_filter = ('ignore', None, DeprecationWarning, None, 13) # lineno
for 'import sets'
warnings.filters.append(_filter)
try:
import sets
finally:
if sys.version >= '2.6':
if warnings.filters.pop(-1) is not _filter:
raise AssertionError
More information about the PEAK
mailing list