Bug 788189

Summary: Allow plague to work with sqlite3 from the stdlib
Product: [Fedora] Fedora Reporter: Toshio Ernie Kuratomi <a.badger>
Component: plagueAssignee: Dan Williams <dcbw>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bugs.michael, dcbw
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: plague-0.4.5.8-7.fc17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-02 01:23:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to allow importing sqlite3 in place of pysqlite2 none

Description Toshio Ernie Kuratomi 2012-02-07 16:54:43 UTC
Created attachment 560007 [details]
Patch to allow importing sqlite3 in place of pysqlite2

Description of problem:

The python-sqlite2 owner would like to orphan and retire that package.  Plague is one of the last real dependencies on that module.  Need to port it to use the sqlite3 module from the python stdlib (2.5+) when that module is present.

Version-Release number of selected component (if applicable):

plague-0.4.5.8-5


pysqlite2 and the sqlite3 module from the stdlib are supposed to be the same code base.  pysqlite2 is able to release more frequently since it isn't tied to python's release schedule.  However, they should be compatible.

I'm attaching a patch to plague that attempts to use sqlite3 in the same manner as pysqlite2 is used.  Note that I am not familiar with python-sqlite(1) so I'm not sure if we could be using the dbapi2 sqlite modules and doing this better.  This seemed like it was a less invasive change than looking at how dbapi2 might affect the code.  I did change the order of imports (so that pysqlite2 is tried first, then sqlite3, then sqlite) since sqlite has been deprecated for many years and it no longer exists on Fedora (where the retiring of python-sqlite2 will actually occur).

The patch also fixes a few places where error messages would actually result in tracebacks instead of doing what they were supposed to.  I just saw them when fixing the imports.

Comment 1 Michael Schwendt 2012-02-08 20:40:26 UTC
Well, I've tested the patch _unmodified_, dropped the python-sqlite2 Requires and erased python-sqlite2, then built a test package for Fedora 16. It works so far, i.e. plague-builder, plague-server, plague-client, plague-user-manager (also the included fix), and the web interface. Haven't run into any traceback or other error that would justify re-reviewing the ancient sqlite3 patch contents.

Comment 2 Fedora Update System 2012-02-17 23:37:50 UTC
plague-0.4.5.8-7.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/plague-0.4.5.8-7.fc17

Comment 3 Fedora Update System 2012-02-18 02:25:25 UTC
Package plague-0.4.5.8-7.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing plague-0.4.5.8-7.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-1949/plague-0.4.5.8-7.fc17
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2012-03-02 01:23:26 UTC
plague-0.4.5.8-7.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.