[Biopython-dev] [Bug 2851] New: Psycopg version 1 support for BioSQL

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Sun Jun 7 16:54:24 UTC 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2851

           Summary: Psycopg version 1 support for BioSQL
           Product: Biopython
           Version: Not Applicable
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: BioSQL
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: cymon.cox at gmail.com


The recent additions the BioSQL interface (bug 2833) as a workaround for the
RULES in the schema (bug 2839) (see also PyGreSQL support bug 2849) has broken
support for Psycopg VERSION 1.

The last release of Psycopg1 was version 1.1.21 on 2005-10-01. So it's pretty
old and most users will probably have moved to psycopg2. However, it not been
deprecated and, without the recent rules workaround code in place, it does pass
all the tests (excepts the rules tests obviously).

Psycopg1 fails the rules workaround code because in the BioSeqDatabase
namespace, the connection object is a list of functions, and not a class that
can be inspected for the driver name, and the IntegrityError is in the driver
module namespace. One possible solution is to make the check for the RULES when
the database is opened, set a module global variable, and later re-import the
module to get the IntegrityError. It is a nasty solution, but in its favour it
can be easily be removed when the RULES are eventually removed from the schema.

Anyway, attached is a patch using this workaround which works for psycopg1,
psycopg2, and PyGreSQL (note only for the pgdb driver and not the pg driver).

C.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list