summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/pypostgresql.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2020-04-18 20:58:41 +0200
committerFederico Caselli <cfederico87@gmail.com>2020-04-29 17:50:44 +0000
commit18ce4f9937c2d6753acbb054b4990c7da298a5d7 (patch)
treec385de2c16ef63586a1c604efe9393bddbb20acf /lib/sqlalchemy/dialects/postgresql/pypostgresql.py
parent0faee1bbf20cb4a2599888b427b8015ec5f3c890 (diff)
downloadsqlalchemy-18ce4f9937c2d6753acbb054b4990c7da298a5d7.tar.gz
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
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/pypostgresql.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/pypostgresql.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/pypostgresql.py b/lib/sqlalchemy/dialects/postgresql/pypostgresql.py
index 289a9a097..bd015a5b8 100644
--- a/lib/sqlalchemy/dialects/postgresql/pypostgresql.py
+++ b/lib/sqlalchemy/dialects/postgresql/pypostgresql.py
@@ -17,6 +17,13 @@
integration** and may have unresolved issues. The recommended PostgreSQL
driver is psycopg2.
+.. deprecated:: 1.4 The py-postgresql DBAPI is deprecated and will be removed
+ in a future version. This DBAPI is superseded by the external
+ version available at external-dialect_. Please use the external version or
+ one of the supported DBAPIs to connect to PostgreSQL.
+
+.. TODO update link
+.. _external-dialect: https://github.com/PyGreSQL
""" # noqa
@@ -69,6 +76,15 @@ class PGDialect_pypostgresql(PGDialect):
def dbapi(cls):
from postgresql.driver import dbapi20
+ # TODO update link
+ util.warn_deprecated(
+ "The py-postgresql DBAPI is deprecated and will be removed "
+ "in a future version. This DBAPI is superseded by the external"
+ "version available at https://github.com/PyGreSQL. Please "
+ "use one of the supported DBAPIs to connect to PostgreSQL.",
+ version="1.4",
+ )
+
return dbapi20
_DBAPI_ERROR_NAMES = [