From: Federico Caselli Date: Thu, 13 Feb 2025 19:10:10 +0000 (+0100) Subject: Deprecate the declarative_mixin decorator X-Git-Tag: rel_2_0_42~24^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb4cb40a27cd14b9176a9739543e35a64dbe8c02;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Deprecate the declarative_mixin decorator References: #12346 Change-Id: I6709c7b33bf99ef94c3dc074a25386e8c13c9131 --- diff --git a/doc/build/orm/declarative_mixins.rst b/doc/build/orm/declarative_mixins.rst index 9f26207c07..32f03334a8 100644 --- a/doc/build/orm/declarative_mixins.rst +++ b/doc/build/orm/declarative_mixins.rst @@ -724,7 +724,7 @@ define on the class itself. The here to create user-defined collation routines that pull from multiple collections:: - from sqlalchemy.orm import declarative_mixin, declared_attr + from sqlalchemy.orm import declared_attr class MySQLSettings: diff --git a/lib/sqlalchemy/orm/decl_api.py b/lib/sqlalchemy/orm/decl_api.py index 60468237ee..8d2e90f441 100644 --- a/lib/sqlalchemy/orm/decl_api.py +++ b/lib/sqlalchemy/orm/decl_api.py @@ -512,6 +512,9 @@ def declarative_mixin(cls: Type[_T]) -> Type[_T]: .. versionadded:: 1.4.6 + .. legacy:: This api is considered legacy and will be deprecated in the next + SQLAlchemy version. + .. seealso:: :ref:`orm_mixins_toplevel`