diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-01-11 10:12:12 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-01-13 10:57:41 -0500 |
| commit | fa6dd376bb24845724287d980a98ea50eb1cfab1 (patch) | |
| tree | 91e536c76f4b76b8997b02f5cd5a41de29dc90ef /lib/sqlalchemy/orm/strategy_options.py | |
| parent | c703b9ce89483b6f44b97d1fbf56f8df8b14305a (diff) | |
| download | sqlalchemy-fa6dd376bb24845724287d980a98ea50eb1cfab1.tar.gz | |
Support python3.6
Corrects some warnings and adds tox config. Adds DeprecationWarning
to the error category. Large sweep for string literals w/ backslashes
as this is common in docstrings
Co-authored-by: Andrii Soldatenko
Fixes: #3886
Change-Id: Ia7c838dfbbe70b262622ed0803d581edc736e085
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/337
Diffstat (limited to 'lib/sqlalchemy/orm/strategy_options.py')
| -rw-r--r-- | lib/sqlalchemy/orm/strategy_options.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/sqlalchemy/orm/strategy_options.py b/lib/sqlalchemy/orm/strategy_options.py index 2f98dc72a..bae2b73e2 100644 --- a/lib/sqlalchemy/orm/strategy_options.py +++ b/lib/sqlalchemy/orm/strategy_options.py @@ -552,7 +552,7 @@ See :func:`.orm.%(name)s` for usage examples. @loader_option() def contains_eager(loadopt, attr, alias=None): - """Indicate that the given attribute should be eagerly loaded from + r"""Indicate that the given attribute should be eagerly loaded from columns stated manually in the query. This function is part of the :class:`.Load` interface and supports @@ -561,8 +561,8 @@ def contains_eager(loadopt, attr, alias=None): The option is used in conjunction with an explicit join that loads the desired rows, i.e.:: - sess.query(Order).\\ - join(Order.user).\\ + sess.query(Order).\ + join(Order.user).\ options(contains_eager(Order.user)) The above query would join from the ``Order`` entity to its related @@ -575,8 +575,8 @@ def contains_eager(loadopt, attr, alias=None): the eagerly-loaded rows are to come from an aliased table:: user_alias = aliased(User) - sess.query(Order).\\ - join((user_alias, Order.user)).\\ + sess.query(Order).\ + join((user_alias, Order.user)).\ options(contains_eager(Order.user, alias=user_alias)) .. seealso:: @@ -953,7 +953,7 @@ def defaultload(*keys): @loader_option() def defer(loadopt, key): - """Indicate that the given column-oriented attribute should be deferred, e.g. + r"""Indicate that the given column-oriented attribute should be deferred, e.g. not loaded until accessed. This function is part of the :class:`.Load` interface and supports @@ -1017,7 +1017,7 @@ def defer(key, *addl_attrs): @loader_option() def undefer(loadopt, key): - """Indicate that the given column-oriented attribute should be undeferred, + r"""Indicate that the given column-oriented attribute should be undeferred, e.g. specified within the SELECT statement of the entity as a whole. The column being undeferred is typically set up on the mapping as a |
