homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients alexis, barry, eric.araujo, pitrou, tarek
Date 2011年10月13日.16:01:31
SpamBayes Score 5.37673e-05
Marked as misclassified No
Message-id <1318521693.13.0.517549681601.issue13167@psf.upfronthosting.co.za>
In-reply-to
Content
The PEP 376 implementation in packaging.database has been called ugly and opaque. When discussing PEP 396 for example (that’s why I’m adding Barry and Antoine to nosy, for their feedback), get_distribution(name).metadata['Version'] did not seem to agree with everyone. (Note that there are shortcuts for two metadata fields: name and version also exist as get_distribution(name).name / .version.)
I’m not sure how we can make it less opaque, unless we force people to read documentation: PEP 376 proposes a database of installed distributions; packaging.database offers get_distribution, which returns an object with some attributes. I can’t have an outside view on this, so maybe you can explain what’s opaque and ugly so that we can try to improve it.
I’ve found in distutils-sig archives from two or three years ago that people intended to offer a get_metadata function that would take a distribution name (i.e. pyOpenSSL, Babel, flufl.enum) and return a mapping object with the metadata read from the installed dist-info/METADATA file. Does that look better to you?
History
Date User Action Args
2011年10月13日 16:01:33eric.araujosetrecipients: + eric.araujo, barry, pitrou, tarek, alexis
2011年10月13日 16:01:33eric.araujosetmessageid: <1318521693.13.0.517549681601.issue13167@psf.upfronthosting.co.za>
2011年10月13日 16:01:32eric.araujolinkissue13167 messages
2011年10月13日 16:01:32eric.araujocreate

AltStyle によって変換されたページ (->オリジナル) /