This repository was archived by the owner on Mar 31, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -831,8 +831,9 @@ def _nth_client_id(self):
831831 def session (self , labels = None , database_role = None ):
832832 """Factory to create a session for this database.
833833
834- Deprecated. Sessions should be checked out using context
835- managers, rather than retrieved directly from the database.
834+ Deprecated. Sessions should be checked out indirectly using context
835+ managers or :meth:`~google.cloud.spanner_v1.database.Database.run_in_transaction`,
836+ rather than built directly from the database.
836837
837838 :type labels: dict (str -> str) or None
838839 :param labels: (Optional) user-assigned labels for the session.
Original file line number Diff line number Diff line change @@ -138,8 +138,9 @@ def _new_session(self):
138138 def session (self , ** kwargs ):
139139 """Check out a session from the pool.
140140
141- Deprecated. Sessions should be checked out using context
142- managers, rather than directly from the pool.
141+ Deprecated. Sessions should be checked out indirectly using context
142+ managers or :meth:`~google.cloud.spanner_v1.database.Database.run_in_transaction`,
143+ rather than checked out directly from the pool.
143144
144145 :param kwargs: (optional) keyword arguments, passed through to
145146 the returned checkout.
@@ -796,8 +797,9 @@ def begin_pending_transactions(self):
796797class SessionCheckout (object ):
797798 """Context manager: hold session checked out from a pool.
798799
799- Deprecated. Sessions should be checked out using context
800- managers, rather than directly from the pool.
800+ Deprecated. Sessions should be checked out indirectly using context
801+ managers or :meth:`~google.cloud.spanner_v1.database.Database.run_in_transaction`,
802+ rather than checked out directly from the pool.
801803
802804 :type pool: concrete subclass of
803805 :class:`~google.cloud.spanner_v1.pool.AbstractSessionPool`
You can’t perform that action at this time.
0 commit comments