[tahoe-lafs-trac-stream] [tahoe-lafs] #1714: Tahoe-lafs fails to start with python 2.7 due to missing argparse module

tahoe-lafs trac at tahoe-lafs.org
Wed Apr 11 03:05:14 UTC 2012


#1714: Tahoe-lafs fails to start with python 2.7 due to missing argparse module
---------------------------+-----------------------
     Reporter:  vrusinov   |      Owner:  zooko
         Type:  defect     |     Status:  assigned
     Priority:  major      |  Milestone:  undecided
    Component:  packaging  |    Version:  1.9.1
   Resolution:             |   Keywords:
Launchpad Bug:             |
---------------------------+-----------------------
Changes (by zooko):

 * owner:  somebody => zooko
 * status:  new => assigned


Comment:

 Hey waitaminute. I went to implement my idea from comment:4 to have
 {{{zfec}}} declare a dependency on the {{{argparse}}} package only if the
 {{{argparse}}} module couldn't be imported. However, I discovered that
 {{{zfec}}} already
 [//trac/zfec/browser/trunk/zfec/setup.py?annotate=blame&rev=390#L156
 declares a dependency on argparse only if Python < 2.7]. So how did you
 get a version of zfec installed into your system that says that it
 requires the {{{argparse}}} package? My guess is that you installed zfec
 with Python 2.6 and then upgraded your system to Python 2.7. I guess this
 shows that the hack of "try to import the {{{argparse}}} module and, if
 that doesn't work, declare a dependency on the {{{argparse}}} package" is
 more robust.

 Assigning to vrusinov to see if he can explain how his install of
 {{{zfec}}} has this dependency on {{{argparse}}} even though he has Python
 2.7. (Hint: where is {{{zfec}}} located? You can tell with $ {{{python -c
 'import zfec;print zfec'}}}.)

 Oh, another explanation would be that you have a version of {{{zfec}}}
 from before its dependency on {{{argparse}}} was conditionalized. That
 would be... let's see...

 [//trac/zfec/changeset/390/trunk https://tahoe-
 lafs.org/trac/zfec/changeset/390/trunk]

 Oh dear... I guess I haven't made a new release of zfec in the 13 months
 since I committed that patch.

 Okay, so a good next step would be for me to edit {{{zfec}}} to use the
 "try import and then fallback to require" approach instead of the "Python
 < 2.7" approach, and then make a new release of zfec.

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1714#comment:5>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


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