distlib.database.Metadata.get_requirements throws a type error

Issue #73 closed
alex lord
created an issue

Repro

from distlib.database import Metadata
meta_data = Metadata()
meta_data.get_requirements(['uttt'], set()) # Valid pypi package, ultimate tick tack toe =P
Traceback (most recent call last):                                                                  
  File "<stdin>", line 1, in <module>                                                               
  File "/home/alex/.virtualenvs/caniusepython3/lib/python3.4/site-packages/distlib-0.2.0-py3.4.egg/distlib/metadata.py", line 874, in get_requirements                                                  
    result.extend(d['requires'])                                                                    
TypeError: string indices must be integers  

Ran into this while attempting to run caniusepython3 on all of pypi. Bound to run into some strange things.

Context:

https://github.com/brettcannon/caniusepython3/issues/87

Comments (2)

  1. Vinay Sajip

    You're not using get_requirements correctly here - it needs to be passed a list of dicts in the format of PEP426 run_requires. However, from looking at the context, it might be a bug in how distlib.database is calling this method, or it might be data-related. Will investigate.

  2. Log in to comment