8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
__slots__
AsyncResource
1 parent 96920b0 commit dfc44cfCopy full SHA for dfc44cf
docs/versionhistory.rst
@@ -28,6 +28,8 @@ This library adheres to `Semantic Versioning 2.0 <http://semver.org/>`_.
28
- Emit a ``ResourceWarning`` for ``MemoryObjectReceiveStream`` and
29
``MemoryObjectSendStream`` that were garbage collected without being closed (PR by
30
Andrey Kazantcev)
31
+- Added ``__slots__`` to ``AsyncResource`` so that child classes can use ``__slots__``
32
+ (`#733 <https://github.com/agronholm/anyio/pull/733>`_; PR by Justin Su)
33
34
**4.3.0**
35
src/anyio/abc/_resources.py
@@ -15,6 +15,8 @@ class AsyncResource(metaclass=ABCMeta):
15
and calls :meth:`aclose` on exit.
16
"""
17
18
+ __slots__ = ()
19
+
20
async def __aenter__(self: T) -> T:
21
return self
22
0 commit comments