[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2242: exception from parsing requirements

Tahoe-LAFS trac at tahoe-lafs.org
Tue Mar 17 16:35:12 UTC 2015


#2242: exception from parsing requirements
---------------------------+-----------------------------------------------
     Reporter:  zooko      |      Owner:
         Type:  defect     |     Status:  new
     Priority:  normal     |  Milestone:  soon
    Component:  packaging  |    Version:  1.10.0
   Resolution:             |   Keywords:  setuptools pkg_resources coverage
Launchpad Bug:             |
---------------------------+-----------------------------------------------

Comment (by zooko):

 Would it be okay if I pushed this patch into trunk? I tested it manually
 and it worked:

 {{{
 diff --git a/setuptools-0.6c16dev5.egg/pkg_resources.py
 b/setuptools-0.6c16dev5.egg/pkg_resources.py
 index a94d89f..bde9087 100644
 --- a/setuptools-0.6c16dev5.egg/pkg_resources.py
 +++ b/setuptools-0.6c16dev5.egg/pkg_resources.py
 @@ -536,7 +536,7 @@ class WorkingSet(object):
                              if dist not in thisreq:
                                  return
                  except ValueError, e:
 -                    e.args = tuple(e.args + ({'thisreqstr':
 thisreqstr},))
 +                    e.args = tuple(e.args + ({'thisreqstr': thisreqstr,
 '__requires__': __requires__},))
                      raise

          self.by_key[dist.key] = dist
 }}}

 Here's the result of running locally a manual test with this patch
 applied, which does indeed helpfully show me what requirements are
 triggering the problem:

 {{{

 Traceback (most recent call last):
   File "/usr/local/bin/verinfo", line 5, in <module>
     from pkg_resources import load_entry_point
   File "/home/zooko/playground/tahoe/tahoe-lafs/support/lib/python2.7
 /site-packages/setuptools-0.6c16dev5.egg/pkg_resources.py", line 2650, in
 <module>
     working_set.add(dist)
   File "/home/zooko/playground/tahoe/tahoe-lafs/support/lib/python2.7
 /site-packages/setuptools-0.6c16dev5.egg/pkg_resources.py", line 534, in
 add
     for thisreq in parse_requirements(thisreqstr):
   File "/home/zooko/playground/tahoe/tahoe-lafs/support/lib/python2.7
 /site-packages/setuptools-0.6c16dev5.egg/pkg_resources.py", line 2463, in
 parse_requirements
     raise ValueError("Missing distribution spec", line, strs)
 ValueError: ('Missing distribution spec', '=', '=', {'__requires__':
 'pyutil==unknown', 'thisreqstr': '='})
 }}}

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2242#comment:4>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list