]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
deprecate: remove async_scoped_session.close_all()
authorBryan不可思议 <programripper@foxmail.com>
Sat, 7 Oct 2023 14:52:11 +0000 (14:52 +0000)
committerGitHub <noreply@github.com>
Sat, 7 Oct 2023 14:52:11 +0000 (14:52 +0000)
lib/sqlalchemy/ext/asyncio/scoping.py

index 0c19acb9797bddc73b6bf98db4bb73ca058b672a..33c9b35900b6f9ea1a02dc48061a15fa2f5f0242 100644 (file)
@@ -67,7 +67,7 @@ _T = TypeVar("_T", bound=Any)
     AsyncSession,
     ":class:`_asyncio.AsyncSession`",
     ":class:`_asyncio.scoping.async_scoped_session`",
-    classmethods=["close_all", "object_session", "identity_key"],
+    classmethods=["object_session", "identity_key"],
     methods=[
         "__contains__",
         "__iter__",
@@ -1543,21 +1543,6 @@ class async_scoped_session(Generic[_AS]):
 
         return self._proxied.info
 
-    @classmethod
-    async def close_all(cls) -> None:
-        r"""Close all :class:`_asyncio.AsyncSession` sessions.
-
-        .. container:: class_bases
-
-            Proxied for the :class:`_asyncio.AsyncSession` class on
-            behalf of the :class:`_asyncio.scoping.async_scoped_session` class.
-
-        .. deprecated:: 2.0 The :meth:`.AsyncSession.close_all` method is deprecated and will be removed in a future release.  Please refer to :func:`.session.close_all_sessions`.
-
-        """  # noqa: E501
-
-        return await AsyncSession.close_all()
-
     @classmethod
     def object_session(cls, instance: object) -> Optional[Session]:
         r"""Return the :class:`.Session` to which an object belongs.