dmwm / DMWMMON

1 stars 8 forks source link

Updating sets #31

Closed SaltumDis closed 7 years ago

SaltumDis commented 8 years ago

Sets are not supported since py2.6. Need to use built-in set(). @ericvaandering suggested to help prepare other projects for migrating to py3

nataliaratnikova commented 7 years ago

Thanks, indeed while sets still work in 2.6.6 with a deprecation warning:

[cmsspacemon@fermicloud005 ~]$ python 
Python 2.6.6 (r266:84292, Aug 18 2016, 12:06:14) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from sets import Set
__main__:1: DeprecationWarning: the sets module is deprecated

In 3.3.2 I get an import error:

[cmsspacemon@fermicloud005 ~]$ /usr/bin/scl enable python33 bash
[cmsspacemon@fermicloud005 ~]$ python
Python 3.3.2 (default, Jun  4 2014, 11:36:37) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from sets import Set
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named 'sets'