broken dependency tree on fresh install

Bug #1500460 reported by Charles Butler
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
lazr.restfulclient
Fix Released
Undecided
Colin Watson

Bug Description

It appears that python restfulclient is now depending on simplejson which is missing from the package dependencies

http://bazaar.launchpad.net/~lazr-developers/lazr.restfulclient/trunk/view/head:/setup.py - has no mention of simplejson

the culprit appears to be here:
http://bazaar.launchpad.net/~lazr-developers/lazr.restfulclient/trunk/view/head:/src/lazr/restfulclient/resource.py#L41

I discovered this via a CI run leveraging tox. The output is here:

http://drone.systemzoo.org/github.com/chuckbutler/flannel-docker-charm/master/b4684b9c66407cc9da33836f2cd97c58901fe1a7

Related branches

description: updated
Revision history for this message
Maurits van Rees (maurits-vanrees) wrote :

I see the same. Looks like it is fixed in release 0.13.4, which is shown as latest download on the project homepage here. But the latest release on PyPI is 0.13.3: https://pypi.python.org/pypi/lazr.restfulclient

With 0.13.3, the code always does 'import simplejson'. With 0.13.4, the code first tries 'from json import dumps, loads', which works in Python 2.6 and up. The import from simplejson is only tried if that fails, so on Python 2.5 or lower. If the project wants to support those Python versions, simplejson should be added to the install_requires for those versions, but I don't mind.

Anyway, the problem here is that the latest release is not in PyPI. Can someone add it?

To reproduce the problem:

$ virtualenv test
Using real prefix '/usr/local/pythons/parts/opt'
New python executable in test/bin/python2.7
Also creating executable in test/bin/python
Installing setuptools, pip, wheel...done.
$ cd test
$ bin/pip install lazr.restfulclient
Collecting lazr.restfulclient
  Downloading lazr.restfulclient-0.13.1.tar.gz (55kB)
...
$ bin/python
Python 2.7.10 (default, Nov 10 2015, 21:29:56)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.1.76)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from lazr.restfulclient import resource
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/maurits/tmp/test/lib/python2.7/site-packages/lazr/restfulclient/resource.py", line 36, in <module>
    import simplejson
ImportError: No module named simplejson

BTW, I get an even older version 0.13.1 in this way, because that is the last one mentioned here:
https://pypi.python.org/simple/lazr.restfulclient/
Properly uploading the latest release should help there.

Info on how PyPI works is here, if needed:
https://python-packaging-user-guide.readthedocs.org/en/latest/

Felipe Reyes (freyes)
Changed in lazr.restfulclient:
assignee: nobody → Felipe Reyes (freyes)
Felipe Reyes (freyes)
Changed in lazr.restfulclient:
assignee: Felipe Reyes (freyes) → nobody
Revision history for this message
John Agosta (jagosta) wrote :

I believe I may be running into this same bug when building a part for a snapcraft snap.

parts:
   launchpadapi:
       plugin: python2
       stage-packages:
         - python-launchpadlib
         - python-httplib2
         - python-lazr.restfulclient
       filesets:
         apifs:
             - usr/lib/python2.7/dist-packages/launchpadlib
             - usr/lib/python2.7/dist-packages/httplib2
             - usr/lib/python2.7/dist-packages/lazr
             - etc/
             - lib/
             - usr/
       stage:
         - $apifs
       snap:
         - $apifs

The error I get is:

       Traceback (most recent call last):
         File "/snap/lptools-john/x2/usr/bin/testreport.py", line 9, in <module>
           from launchpadlib.launchpad import Launchpad
         File "/snap/lptools-john/x2/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 33, in <module>
           from lazr.restfulclient.resource import (
       ImportError: No module named lazr.restfulclient.resource

Revision history for this message
Colin Watson (cjwatson) wrote :

I've uploaded lazr.restfulclient 0.13.5 to PyPI, including the necessary patch for this. Sorry for the long delay.

Changed in lazr.restfulclient:
assignee: nobody → Colin Watson (cjwatson)
status: New → 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.