Bug 740395 - koji/db.py has a broken import
Summary: koji/db.py has a broken import
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: koji
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 742634 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-21 21:29 UTC by Andy Grimm
Modified: 2016-11-08 03:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-09 21:46:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Fix _quoteparams call for PyGreSQL 4 (818 bytes, patch)
2011-09-21 21:29 UTC, Andy Grimm
no flags Details | Diff

Description Andy Grimm 2011-09-21 21:29:12 UTC
Created attachment 524277 [details]
Fix _quoteparams call for PyGreSQL 4

Version-Release number of selected component (if applicable):
koji-1.6.0-2.fc15.noarch

In PyGreSQL 4.0, the _quoteparams method moved into the pgdbCursor class, so this import in koji 1.6.0 is no longer valid:

File "/usr/lib/python2.7/site-packages/koji/db.py", line 29:
from pgdb import _quoteparams

I have only tried this on F16, but I suspect that F15 and rawhide are similarly affected.

The attached patch removes the import and uses pgdb.version to decide how to call _quoteparams

Comment 1 Michael Cronenworth 2011-10-12 13:23:32 UTC
*** Bug 742634 has been marked as a duplicate of this bug. ***

Comment 2 Michael Cronenworth 2011-10-12 13:33:57 UTC
The patch doesn't work for F15:

[Wed Oct 12 08:26:09 2011] [error] [client 127.0.0.1]   File "/usr/lib/python2.7/site-packages/koji/db.py", line 92
[Wed Oct 12 08:26:09 2011] [error] [client 127.0.0.1]     if float(pgdb.version): < 4:
[Wed Oct 12 08:26:09 2011] [error] [client 127.0.0.1]                             ^
[Wed Oct 12 08:26:09 2011] [error] [client 127.0.0.1] SyntaxError: invalid syntax

Comment 3 Mike McLean 2011-10-12 16:13:29 UTC
I'm testing a different patch for this now. Basically looks for pgdb._quoteparams() or cursor._quoteparams(), and falls back to a simpler method if neither is available.

Comment 4 Ken Dreyer 2011-11-30 05:10:11 UTC
Also filed at https://fedorahosted.org/koji/ticket/224

Comment 5 Fedora Admin XMLRPC Client 2012-01-31 12:01:24 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Mike McLean 2012-03-09 21:46:14 UTC
Fixed upstream
https://fedorahosted.org/koji/ticket/224


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