From 18ce4f9937c2d6753acbb054b4990c7da298a5d7 Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Sat, 18 Apr 2020 20:58:41 +0200 Subject: Deprecate unsupported dialects and dbapi - Deprecate dialects firebird and sybase. - Deprecate DBAPI - mxODBC for mssql - oursql for mysql - pygresql and py-postgresql for postgresql - Removed adodbapi DBAPI for mssql Fixes: #5189 Change-Id: Id9025f4f4de7e97d65aacd0eb4b0c21beb9a67b5 --- lib/sqlalchemy/dialects/postgresql/pygresql.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/sqlalchemy/dialects/postgresql/pygresql.py') diff --git a/lib/sqlalchemy/dialects/postgresql/pygresql.py b/lib/sqlalchemy/dialects/postgresql/pygresql.py index 8666f4172..8dbd23fe9 100644 --- a/lib/sqlalchemy/dialects/postgresql/pygresql.py +++ b/lib/sqlalchemy/dialects/postgresql/pygresql.py @@ -17,6 +17,10 @@ integration** and may have unresolved issues. The recommended PostgreSQL dialect is psycopg2. +.. deprecated:: 1.4 The pygresql DBAPI is deprecated and will be removed + in a future version. Please use one of the supported DBAPIs to + connect to PostgreSQL. + """ # noqa import decimal @@ -197,6 +201,13 @@ class PGDialect_pygresql(PGDialect): def dbapi(cls): import pgdb + util.warn_deprecated( + "The pygresql DBAPI is deprecated and will be removed " + "in a future version. Please use one of the supported DBAPIs to " + "connect to PostgreSQL.", + version="1.4", + ) + return pgdb colspecs = util.update_copy( -- cgit v1.2.1