summaryrefslogtreecommitdiff
path: root/Lib/asyncio/unix_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio/unix_events.py')
-rw-r--r--Lib/asyncio/unix_events.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index 77905344fb..2806ea8dc9 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -419,7 +419,8 @@ class _UnixReadPipeTransport(transports.ReadTransport):
if compat.PY34:
def __del__(self):
if self._pipe is not None:
- warnings.warn("unclosed transport %r" % self, ResourceWarning)
+ warnings.warn("unclosed transport %r" % self, ResourceWarning,
+ source=self)
self._pipe.close()
def _fatal_error(self, exc, message='Fatal error on pipe transport'):
@@ -619,7 +620,8 @@ class _UnixWritePipeTransport(transports._FlowControlMixin,
if compat.PY34:
def __del__(self):
if self._pipe is not None:
- warnings.warn("unclosed transport %r" % self, ResourceWarning)
+ warnings.warn("unclosed transport %r" % self, ResourceWarning,
+ source=self)
self._pipe.close()
def abort(self):