--- /dev/null
+.. change::
+ :tags: typing, orm
+ :tickets: 12346
+
+ Deprecated the ``declarative_mixin`` decorator since it was used only
+ by the now removed mypy plugin.
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:
.. autofunction:: declarative_base
-.. autofunction:: declarative_mixin
-
.. autofunction:: as_declarative
.. autofunction:: mapped_column
return declared_attr(fn, **self.kw)
+@util.deprecated(
+ "2.1",
+ "The declarative_mixin decorator was used only by the now removed "
+ "mypy plugin so it has no longer any use and can be safely removed.",
+)
def declarative_mixin(cls: Type[_T]) -> Type[_T]:
"""Mark a class as providing the feature of "declarative mixin".
from sqlalchemy.testing import is_
from sqlalchemy.testing import is_true
from sqlalchemy.testing import mock
+from sqlalchemy.testing import uses_deprecated
from sqlalchemy.testing.fixtures import fixture_session
from sqlalchemy.testing.schema import Column
from sqlalchemy.testing.schema import mapped_column
eq_(obj.name, "testing")
eq_(obj.foo(), "bar1")
+ @uses_deprecated(
+ "The declarative_mixin decorator was used only by the now removed "
+ "mypy plugin so it has no longer any use and can be safely removed."
+ )
def test_declarative_mixin_decorator(self):
@declarative_mixin
class MyMixin: