Requirement "argparse" breaks package import

Bug #1401783 reported by orbisvicis
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Fix Released
High
Unassigned
stevedore
Fix Released
Undecided
Unassigned
stevedore (Ubuntu)
Fix Released
High
Unassigned

Bug Description

$ python3
Python 3.4.2 (default, Oct 8 2014, 13:18:07)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> __requires__ = "stevedore >= 1.0"
>>> from pkg_resources import load_entry_point
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2876, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 449, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 745, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 639, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: argparse
>>>

The argparse module has been part of python for years. Remove "argparse" from stevedore's "requirements.txt" toplevel file. See https://aur.archlinux.org/packages/subliminal-git/ for more information.

Tags: vivid
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for taking your time to report this issue and help making Ubuntu better.

I was able to reproduce this issue with python3-stevedore 1.1.0-0ubuntu1 on Ubuntu Vivid following the steps outlined above.

While researching, I found that upstream has had a similar bug report quite recently and it seems like they are still building for python 2.6 (see bug 1372433 for details). However, I don't believe Ubuntu is still shipping 2.6, so it might be possible to patch the package. I've marked this issue as affecting upstream as well, to hear what they have to say.

Changed in stevedore (Ubuntu):
status: New → Confirmed
tags: added: vivid
Changed in stevedore (Ubuntu):
importance: Undecided → High
Changed in hundredpapercuts:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

We test stevedore with python 2.6, 2.7, 3.3, and 3.4 and do not see this problem. Hans' suggestion to patch the system package seems like a good approach until we can drop 2.6 support (after OpenStack Icehouse long term support expires).

Changed in python-stevedore:
status: New → Incomplete
Revision history for this message
Robie Basak (racb) wrote :

Could you please explain why this is a problem for users in Ubuntu? What could users do that would cause an impact?

Changed in stevedore (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package stevedore - 1.5.0-2ubuntu1

---------------
stevedore (1.5.0-2ubuntu1) xenial; urgency=medium

  * Cherry-pick from upstream:
    - Remove unnecessary dependency on argparse (closes: #809033,
      LP: #1401783).

 -- Colin Watson <email address hidden> Fri, 08 Jan 2016 01:33:13 +0000

Changed in stevedore (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Adrian Popa (adrian-popa-gh) wrote :

Unfortunately the fix is not yet backported to vivid or wily. To fix it yourselves you need to remove argparse from the following file:

vivid: /usr/lib/python3/dist-packages/stevedore-1.3.0.egg-info/requires.txt
wily: /usr/lib/python3/dist-packages/stevedore-1.5.0.egg-info/requires.txt

Changed in hundredpapercuts:
status: Confirmed → Fix Released
Revision history for this message
ChangBo Guo(gcb) (glongwave) wrote :
Changed in python-stevedore:
status: Incomplete → Opinion
status: Opinion → 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.