Bug 195548 - command.py contains invalid use of pkg_resources.Requirement class
Summary: command.py contains invalid use of pkg_resources.Requirement class
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-sqlobject
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ignacio Vazquez-Abrams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-06-15 18:00 UTC by Luke Macken
Modified: 2016-09-20 02:37 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-07-09 16:40:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
python-sqlobject-0.7.0-pkg_resources.patch (629 bytes, patch)
2006-06-15 18:00 UTC, Luke Macken
no flags Details | Diff

Description Luke Macken 2006-06-15 18:00:52 UTC
Description of problem:
When playing around TurboGears, running `tg-admin sql create` triggered this bug:

Traceback (most recent call last):
  File "/usr/bin/tg-admin", line 7, in ?
    sys.exit(
  File "/usr/lib/python2.4/site-packages/turbogears/command/__init__.py", line
186, in main
    command.run()
  File "/usr/lib/python2.4/site-packages/turbogears/command/__init__.py", line
106, in run
    command.the_runner.run(sys.argv)
  File "/usr/lib/python2.4/site-packages/sqlobject/manager/command.py", line
102, in run
    runner.run()
  File "/usr/lib/python2.4/site-packages/sqlobject/manager/command.py", line
232, in run
    self.load_options_from_egg(egg_spec)
  File "/usr/lib/python2.4/site-packages/sqlobject/manager/command.py", line
415, in load_options_from_egg
    dist, conf = self.config_from_egg(egg_spec)
  File "/usr/lib/python2.4/site-packages/sqlobject/manager/command.py", line
426, in config_from_egg
    dist = pkg_resources.working_set.find(pkg_resources.Requirement(egg_spec))
TypeError: __init__() takes exactly 4 arguments (2 given)

Looking into it further, the pkg_resources.Requirement should be created using
the static class parse(), and not through __init__.

Attached is a patch to resolve this issue.

Version-Release number of selected component (if applicable):
python-sqlobject-0.7.0-5.fc5

Comment 1 Luke Macken 2006-06-15 18:00:52 UTC
Created attachment 130995 [details]
python-sqlobject-0.7.0-pkg_resources.patch

Comment 2 Aurelien Bompard 2006-07-09 04:24:32 UTC
See also :
http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg207241.html
Debian is having the same problem, a patch is attached

Comment 3 Luke Macken 2006-07-09 16:40:38 UTC
Patch applied and pushed out in python-sqlobject-0.7.0-5 for devel, FC-5, and FC-4.


Note You need to log in before you can comment on or make changes to this bug.