Bug 740395

Summary: koji/db.py has a broken import
Product: [Fedora] Fedora Reporter: Andy Grimm <agrimm>
Component: kojiAssignee: Dennis Gilmore <dennis>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: dcantrell, jgoulding, ktdreyer, mikem, nathanael
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-09 21:46:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Fix _quoteparams call for PyGreSQL 4 none

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