Skip to content

Commit

Permalink
Deprecating psycopg support in BioSQL code (use psycopg2 instead)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterc committed Jun 22, 2009
1 parent 9726314 commit 1b8c00f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions BioSQL/BioSeqDatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ def open_database(driver = "MySQLdb", **kwargs):

server = DBServer(conn, module)

if driver == "psycopg" :
import warnings
warnings.warn("Using BioSQL with psycopg (version one) is deprecated. "
"It still works for now, but we recommend you update "
"to using psycopg2 as a future release of Biopython "
"will drop support for psycop (version one).",
DeprecationWarning)

# TODO - Remove the following once BioSQL Bug 2839 is fixed.
# Test for RULES in PostgreSQL schema, see also Bug 2833.
if driver in ["psycopg", "psycopg2", "pgdb"]:
Expand Down
5 changes: 5 additions & 0 deletions DEPRECATED
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Python 2.3
No longer supported as of Release 1.51, having triggered a warning with
Release 1.50, with a mention in the release notes for Release 1.49.

BioSQL and psycopg
==================
Support for psycopg (version one) in Biopython's BioSQL code was deprecated
in Release 1.51, please use psycopg2 instead.

Bio.Entrez.efetch and rettype="genbank"
=======================================
As of Easter 2009, the NCBI have stopped supporting the unofficial return type
Expand Down

0 comments on commit 1b8c00f

Please sign in to comment.