From a6094d6682c956ce8a77fbec2a2700f901f3e75e Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 8 Jan 2019 17:46:55 -0500 Subject: use ..deprecated directive w/ version in all cases These changes should be ported from 1.3 back to 1.0 or possibly 0.9 to the extent they are relevant in each version. In 1.3 we hope to turn all deprecation documentation into warnings. Change-Id: I205186cde161af9389af513a425c62ce90dd54d8 --- lib/sqlalchemy/engine/interfaces.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'lib/sqlalchemy/engine/interfaces.py') diff --git a/lib/sqlalchemy/engine/interfaces.py b/lib/sqlalchemy/engine/interfaces.py index f738b5caf..562a7deeb 100644 --- a/lib/sqlalchemy/engine/interfaces.py +++ b/lib/sqlalchemy/engine/interfaces.py @@ -254,11 +254,11 @@ class Dialect(object): def get_primary_keys(self, connection, table_name, schema=None, **kw): """Return information about primary keys in `table_name`. + .. deprecated:: 0.8 - Deprecated. This method is only called by the default - implementation of :meth:`.Dialect.get_pk_constraint`. Dialects should - instead implement the :meth:`.Dialect.get_pk_constraint` method - directly. + The :meth:`.Dialect.get_primary_keys` method is deprecated and + will be removed in a future release. Please refer to the + :meth:`.Dialect.get_pk_constraint` method. """ @@ -1134,9 +1134,11 @@ class Connectable(object): @util.deprecated( "0.7", - "Use the create() method on the given schema " - "object directly, i.e. :meth:`.Table.create`, " - ":meth:`.Index.create`, :meth:`.MetaData.create_all`", + "The :meth:`.Connectable.create` method is deprecated and will be " + "removed in a future release. Please use the ``.create()`` method " + "on specific schema objects to emit DDL sequences, including " + ":meth:`.Table.create`, :meth:`.Index.create`, and " + ":meth:`.MetaData.create_all`." ) def create(self, entity, **kwargs): """Emit CREATE statements for the given schema entity. @@ -1146,10 +1148,11 @@ class Connectable(object): @util.deprecated( "0.7", - "Use the drop() method on the given schema " - "object directly, i.e. :meth:`.Table.drop`, " - ":meth:`.Index.drop`, :meth:`.MetaData.drop_all`", - ) + "The :meth:`.Connectable.drop` method is deprecated and will be " + "removed in a future release. Please use the ``.drop()`` method " + "on specific schema objects to emit DDL sequences, including " + ":meth:`.Table.drop`, :meth:`.Index.drop`, and " + ":meth:`.MetaData.drop_all`.") def drop(self, entity, **kwargs): """Emit DROP statements for the given schema entity. """ -- cgit v1.2.1