Hi, The sets module is deprecated in Python 2.6 and 'set' is a built-in type since Python 2.4. However by applying this change the module becomes incompatible with Python 2.3. If it needs to be compatible, do this in the import: try: set except NameError: from sets import Set as set
Furthermore I found that the mailing list URL in the README is outdated. HTH fs
diff --git a/README b/README index 913a9cc..a21df7e 100644 --- a/README +++ b/README @@ -11,6 +11,7 @@ https://lists.linux.duke.edu/mailman/listinfo/yum If you have created an utility related to yum and you'd like to look into getting it included into this set please e-mail the yum-devel mailing list: +http://lists.baseurl.org/mailman/listinfo/yum-devel https://lists.linux.duke.edu/mailman/listinfo/yum-devel
The sets module is deprecated in Python 2.6 and 'set' is a built-in type since Python 2.4. However by applying this change the module becomes incompatible with Python 2.3. If it needs to be compatible, do this in the import: try: set except NameError: from sets import Set as set diff --git a/plugins/fedorakmod/fedorakmod.py b/plugins/fedorakmod/fedorakmod.py index 4a237c6..d9fcc4b 100644 --- a/plugins/fedorakmod/fedorakmod.py +++ b/plugins/fedorakmod/fedorakmod.py @@ -22,7 +22,6 @@ import os import rpmUtils -from sets import Set from yum import packages from yum.constants import TS_INSTALL from yum.plugins import TYPE_CORE, PluginYumExit @@ -31,7 +30,7 @@ from rpm import RPMPROB_FILTER_OLDPACKAGE requires_api_version = '2.4' plugin_type = (TYPE_CORE,) -kernelProvides = Set([ "kernel-%s" % a for a in rpmUtils.arch.arches.keys() ]) +kernelProvides = set([ "kernel-%s" % a for a in rpmUtils.arch.arches.keys() ]) # We shouldn't need this if we didn't have to fake stuff so much kernelVariants = ["bigmem", "enterprise", "smp", "hugemem", "PAE", @@ -222,7 +221,7 @@ def pinKernels(c, newKernels, installedKernels, modules): kmods = [ po.kmodName for po in table[prov] ] else: kmods = [] - if Set(kmods) != Set(names): + if set(kmods) != set(names): c.info(2, "Removing kernel %s from install set" % str(prov)) # XXX: This wants a pkgtuple which will probably change RSN c.getTsInfo().remove(kpo.pkgtup)
_______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel