Commits

John McFarlane  committed 2ff1213

Use python2.6 compatible syntax for a set

Previously consumption of metadata.py broke under python2.6:

$ python2.6
Python 2.6.8 (default, Sep 21 2012, 13:59:38)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> SKIP_FIELDS = { "description" }
File "<stdin>", line 1
SKIP_FIELDS = { "description" }
^
SyntaxError: invalid syntax
>>>

$ python2.7
Python 2.7.3 (default, Sep 26 2012, 21:51:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> { "description" } == set(["description"])
True
>>>

  • Participants
  • Parent commits 265cb5c
  • Branches skip-fields-py26

Comments (0)

Files changed (1)

File wheel/metadata.py

 PLURAL_FIELDS = { "classifier" : "classifiers", 
                   "provides_dist" : "provides",
                   "provides_extra" : "extras" }
-SKIP_FIELDS =  { "description" }
+SKIP_FIELDS = set(["description"])
 
 def unique(iterable):
     seen = set()