pkginfo does not pick up a project description correctly

Bug #1885458 reported by Vinay Sajip
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pkginfo
Fix Released
Undecided
Tres Seaver

Bug Description

According to the Python packaging specifications, the description of a package can either be in the Description field (header) of the metadata, or in the body.

However, pkginfo appears to be only looking in the body, irrespective of the metadata version. This seems to be incorrect, since the presence of the description in the body is a recent addition to the metadata specifications - earlier metadata versions had the description in the description field.

See here for more information:

https://github.com/pypa/warehouse/issues/8174

The bug was originally reported against PyPI, but the developers there have narrowed it down to a problem with pkginfo not reading the description from the Description field when looking at wheels.

$ pkginfo ./distlib-0.3.1.zip | grep description
description: Low-level components of distutils2/packaging, augmented with higher-level APIs for making packaging easier.

but

$ pkginfo ./distlib-0.3.1-py2.py3-none-any.whl | grep description
description:

The description is there in the METADATA file:

Metadata-Version: 1.1
Name: distlib
Version: 0.3.1
Summary: Distribution utilities
Description: Low-level components of distutils2/packaging, augmented with higher-level APIs for making packaging easier.
Home-page: https://bitbucket.org/pypa/distlib
Author: Vinay Sajip
Author-email: <email address hidden>
License: Python license
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Python Software Foundation License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Download-URL: https://bitbucket.org/pypa/distlib/downloads/distlib-0.3.1.zip

Revision history for this message
Tres Seaver (tseaver) wrote :

Thanks for the report. I can confirm that pkginfo does display that behavior with the the 'distlib' wheel.

Changed in pkginfo:
assignee: nobody → Tres Seaver (tseaver)
status: New → Confirmed
Tres Seaver (tseaver)
Changed in pkginfo:
status: Confirmed → Fix Committed
Tres Seaver (tseaver)
Changed in pkginfo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.