summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2020-03-10 19:33:51 +0100
committerFederico Caselli <cfederico87@gmail.com>2020-03-10 19:46:31 +0100
commit71e368081a63b323bea092b379523d8cd0ab3fdb (patch)
treef7e4fe750c1c873109f36fbff25c57c45ae19992 /lib/sqlalchemy
parent7187bad366749fea03572dcc88114a49a21525b1 (diff)
downloadsqlalchemy-71e368081a63b323bea092b379523d8cd0ab3fdb.tar.gz
Deprecate :func:`.eagerload` and :func:`.relation`
The :func:`.eagerload` and :func:`.relation` were old aliases and are now deprecated. Use :func:`.joinedload` and :func:`.relationship` respectively. Fixes: #5192 Change-Id: Ie13186e117e93e04a9c19d42fed4ef1af629b465
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/__init__.py b/lib/sqlalchemy/orm/__init__.py
index 307f55ad0..8f6e3c218 100644
--- a/lib/sqlalchemy/orm/__init__.py
+++ b/lib/sqlalchemy/orm/__init__.py
@@ -97,6 +97,7 @@ def create_session(bind=None, **kwargs):
relationship = public_factory(RelationshipProperty, ".orm.relationship")
+@_sa_util.deprecated_20("relation", "Please use :func:`.relationship`.")
def relation(*arg, **kw):
"""A synonym for :func:`relationship`."""
@@ -254,6 +255,7 @@ defaultload = strategy_options.defaultload._unbound_fn
selectin_polymorphic = strategy_options.selectin_polymorphic._unbound_fn
+@_sa_util.deprecated_20("relation", "Please use :func:`joinedload`.")
def eagerload(*args, **kwargs):
"""A synonym for :func:`joinedload()`."""
return joinedload(*args, **kwargs)