Python PKG-INFO parsing

Comment 3 for bug 733827

Sridhar Ratnakumar (srid) wrote :

Looks like this introduced a regression in 0.8:

    def __init__(self):
> self.extractMetadata()

pypm/grail/veneer.py:297:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <pypm.grail.veneer.Distribution2 object at 0x101e5be10>

    def extractMetadata(self):
        data = self.read()
> self.parse(data)

lib/python2.7/site-packages/pkginfo/distribution.py:110:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <pypm.grail.veneer.Distribution2 object at 0x101e5be10>
data = u'Metadata-Version: 1.0\nName: zope.interface\nVersion: 3.6.1\nSummary: Interf....1\nClassifier: Topic :: Software Development :: Libraries :: Python Modules\n'

    def parse(self, data):
> fp = StringIO(data)
E TypeError: 'unicode' does not have the buffer interface

lib/python2.7/site-packages/pkginfo/distribution.py:119: TypeError