Python 2.6 warns that the sets module is now deprecated, and parser.py is using it. Would the regular built-in set() type work? diff --git a/pykickstart/parser.py b/pykickstart/parser.py index ee01983..04eef05 100644 --- a/pykickstart/parser.py +++ b/pykickstart/parser.py @@ -38,7 +38,6 @@ import string import tempfile from copy import copy from optparse import * -from sets import * from urlgrabber import urlopen import urlgrabber.grabber as grabber @@ -333,10 +332,10 @@ class Packages: """Given a list of lines from the input file, strip off any leading symbols and add the result to the appropriate list. """ - existingExcludedSet = Set(self.excludedList) - existingPackageSet = Set(self.packageList) - newExcludedSet = Set() - newPackageSet = Set() + existingExcludedSet = set(self.excludedList) + existingPackageSet = set(self.packageList) + newExcludedSet = set() + newPackageSet = set() for pkg in pkgList: stripped = pkg.strip()
Yes that should work. python's builtin set type supports all the operations that the old sets.Set did. Thanks for the patch.