python-formencode should depend on python-pkg-resources

Bug #253431 reported by Adam Victor Brandizzi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-formencode (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python-formencode

When trying to use/import the Python formencode module from the package python-formencode 0.7.1-2 without the package python-pkg-resources installed, I've got the following exception:

>>> import formencode
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/formencode/__init__.py", line 1, in <module>
    from api import *
  File "/usr/lib/python2.5/site-packages/formencode/api.py", line 9, in <module>
    from pkg_resources import resource_filename
ImportError: No module named pkg_resources

So, I installed python-pkg-resources 0.6c8-0ubuntu2 and got no more errors. So, I bet python-formencode should have python-pkg-resources as a dependence.

Revision history for this message
tilman (tilmaniac) wrote :

Had this same problem today.
I installed python-setuptools which, in turn, depends on python-pkg-resources.

I agree with the OP that a dependency should be added.

Revision history for this message
Michael Bienia (geser) wrote :

Based on the mentioned versions I guess you are using Ubuntu hardy.
I've done a quick check on Ubuntu intrepid and couldn't reproduce it anymore so I guess it was fixed in intrepid.
Can you still reproduce this in Ubuntu intrepid?

Changed in python-formencode:
status: New → Incomplete
Revision history for this message
Adam Victor Brandizzi (brandizzi+launchpad-net) wrote :

I tried it on intrepid, and the error does not occur anymore. It seems the python-pkg-resources is installed by default in intrepid, but is not an dependency to python-formencode. Anyway, it worked fine.

Revision history for this message
Ralph Janke (txwikinger) wrote :

We'd like to figure out what's causing this bug for you, but we haven't heard back from you in a while. Could you please provide the requested information? Thanks!

Changed in python-formencode (Ubuntu):
status: Incomplete → Invalid
status: Invalid → Fix Released
status: Fix Released → Incomplete
Revision history for this message
Adam Victor Brandizzi (brandizzi+launchpad-net) wrote :

Exatly what information?

This bug was caused because the package python-formencode did not depend upon the package python-pkg-resources in hardy, but python-pkg-resources is needed to the proper use of python-formencode. In intrepid, python-pkg-resources were installed by default for some reason, so python-formencode worked well - although the package python-formenconde still didn't list python-pkg-resources as a dependency. I believe it would be better to list python-pkg-resources as a dependency.

However, in karmic, the package python-formencode depends upon python-pkg-resources, as can be seen in its control file:

Depends: python (<< 2.7), python (>= 2.6), python-support (>= 0.7.1), python-dns, python-pkg-resources

From jaunty backwards, it does not occur, however.

I would say the bug was repaired in karmic - so, do I have to close the bug? Or should the bug be repaired in jaunty etc. to be closed? I am sorry, I am very confused, but I want to solve the problem...

Revision history for this message
Chuck Short (zulcss) wrote :

This should be fixed on lucid already.

Regards
chuck

Changed in python-formencode (Ubuntu):
status: Incomplete → 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.