pkginfo 1.8.x parsing incorrect metadata from tensorflow wheel?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pkginfo |
Confirmed
|
Undecided
|
Tres Seaver |
Bug Description
From this report: https:/
-------
# pip install -q pkginfo~=1.8.0
>>> from pipgrip.pipper import _extract_metadata
>>> _extract_
{'metadata_
'name': 'gast',
'version': '0.4.0',
'platforms': ['UNKNOWN'],
'summary': 'Python AST that abstracts the underlying Python version',
'description': "A generic AST to represent Python2 and Python3's Abstract Syntax Tree(AST).\n\nGAST provides a compatibility layer between the AST of various Python versions,\nas produced by ``ast.parse`` from the standard ``ast`` module.",
'home_page': 'https:/
'author': 'serge-
'author_email': '<email address hidden>',
'license': 'BSD 3-Clause',
'classifiers': ['Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7'],
'requires_python': '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*'}
# pip install -q 'pkginfo<1.8.0'
>>> from pipgrip.pipper import _extract_metadata
>>> _extract_
{'metadata_
'name': 'tensorflow',
'version': '2.7.0',
'platforms': ['UNKNOWN'],
'summary': 'TensorFlow is an open source machine learning framework for everyone.',
'keywords': 'tensorflow tensor machine learning',
'home_page': 'https:/
'author': 'Google Inc.',
'author_email': '<email address hidden>',
'license': 'Apache 2.0',
'classifiers': ['Development Status :: 5 - Production/Stable',
'Environment :: GPU :: NVIDIA CUDA :: 11.2',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Scientific/
'Topic :: Scientific/
'Topic :: Scientific/
'Topic :: Software Development',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules'],
'download_url': 'https:/
'requires_dist': ['numpy (>=1.14.5)',
'absl-py (>=0.4.0)',
'astunparse (>=1.6.0)',
'libclang (>=9.0.1)',
'flatbuffers (<3.0,>=1.12)',
'google-pasta (>=0.1.1)',
'h5py (>=2.9.0)',
'keras-
'opt-einsum (>=2.3.2)',
'protobuf (>=3.9.2)',
'six (>=1.12.0)',
'termcolor (>=1.1.0)',
'typing-
'wheel (<1.0,>=0.32.0)',
'wrapt (>=1.11.0)',
'gast (<0.5.0,>=0.2.1)',
'tensorboard (~=2.6)',
'tensorflow-
'keras (<2.8,>=2.7.0rc0)',
'tensorflow-
'grpcio (<2.0,>=1.24.3)'],
'description_
'description': "[![Python](https:/
-------
I can reproduce this report with bare `pkginfo`:
------- ------- ------- ------- ---- %< ------- ------- ------- ------- ----
$ python3.8 -m venv /tmp/lp-1953227
$ cd /tmp/lp-1953227/
$ bin/pip install --upgrade setuptools pip wheel
...
Successfully installed pip-21.3.1 setuptools-59.4.0 wheel-0.37.0
$ bin/pip install "pkginfo~=1.8.0" 1.8.2-py2. py3-none- any.whl (26 kB)
Collecting pkginfo~=1.8.0
Downloading pkginfo-
Installing collected packages: pkginfo
Successfully installed pkginfo-1.8.2
$ wget https:/ /files. pythonhosted. org/packages/ 72/8a/033b584f8 dd863c07aa8877c 2dd231777de0bb0 b1338f4ac6a8199 9980ee/ tensorflow- 2.7.0-cp38- cp38-manylinux2 010_x86_ 64.whl 2.7.0-cp38- cp38-manylinux2 010_x86_ 64.whl’ saved [489633495/ 489633495]
...
2021-12-04 13:11:17 (1.76 MB/s) - ‘tensorflow-
$ bin/pkginfo tensorflow- 2.7.0-cp38- cp38-manylinux2 010_x86_ 64.whl
metadata_version: 1.2
name: gast
version: 0.4.0
platforms: ['UNKNOWN']
summary: Python AST that abstracts the underlying Python version
description: A generic AST to represent Python2 and Python3's Abstract Syntax Tree(AST).
GAST provides a compatibility layer between the AST of various Python versions, /github. com/serge- sans-paille/ gast/
as produced by ``ast.parse`` from the standard ``ast`` module.
home_page: https:/
...
$ bin/pip install "pkginfo<1.8.0"
...
Successfully installed pkginfo-1.7.1
$ bin/pkginfo tensorflow- 2.7.0-cp38- cp38-manylinux2 010_x86_ 64.whl /img.shields. io/pypi/ pyversions/ tensorflow. svg?style= plastic) ](https: //badge. fury.io/ py/tensorflow) /badge. fury.io/ py/tensorflow. svg)](https:/ /badge. fury.io/ py/tensorflow)
metadata_version: 2.1
name: tensorflow
version: 2.7.0
platforms: ['UNKNOWN']
summary: TensorFlow is an open source machine learning framework for everyone.
description: [![Python](https:/
[![PyPI](https:/
TensorFlow is an open source software library for high performance numerical
computation. Its flexible architecture allows easy deployment of computation
across a variety of platforms (CPUs, GPUs, TPUs), and from desktops to clusters
of servers to mobile and edge devices.
...
------- ------- ------- ------- ---- %< ------- ------- ------- ------- ----
It fails with the current release, too:
------- ------- ------- ------- ---- %< ------- ------- ------- ------- ----
$ bin/pip install --upgrade pkginfo
...
Successfully installed pkginfo-1.8.2
$ bin/pkginfo tensorflow- 2.7.0-cp38- cp38-manylinux2 010_x86_ 64.whl ------- ------- ------- ---- %< ------- ------- ------- ------- ----
metadata_version: 1.2
name: gast
version: 0.4.0
platforms: ['UNKNOWN']
summary: Python AST that abstracts the underlying Python version
description: A generic AST to represent Python2 and Python3's Abstract Syntax Tree(AST).
...
-------
The 'tensorflow' wheel appears to vendor in a couple of 'gast'-related files:
------- ------- ------- ------- ---- %< ------- ------- ------- ------- ---- 2.7.0-cp38- cp38-manylinux2 010_x86_ 64.whl | grep gast python/ autograph/ pyct/gast_ util.py include/ external/ gast_archive/ PKG-INFO ------- ------- ------- ---- %< ------- ------- ------- ------- ----
$ unzip -l tensorflow-
2244 2021-11-01 17:17 tensorflow/
1165 2021-11-01 17:17 tensorflow/
-------
I suspect that the last one is the source of the pro...