summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/tasks.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2022-10-05 06:49:10 (GMT)
committerGitHub <noreply@github.com>2022-10-05 06:49:10 (GMT)
commit8079bef56f2249ecedafe0be5a6d7a120a7f3ac3 (patch)
tree728a3afbab702ee4442a12d620ccd3e390a0a0ed /Lib/asyncio/tasks.py
parentc70c8b69762f720377adaf22f2e5ec6496a7be53 (diff)
downloadcpython-8079bef56f2249ecedafe0be5a6d7a120a7f3ac3.zip
cpython-8079bef56f2249ecedafe0be5a6d7a120a7f3ac3.tar.gz
cpython-8079bef56f2249ecedafe0be5a6d7a120a7f3ac3.tar.bz2
GH-96704: Add {Task,Handle}.get_context(), use it in call_exception_handler() (#96756)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Diffstat (limited to 'Lib/asyncio/tasks.py')
-rw-r--r--Lib/asyncio/tasks.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index e48da0f..8d6dfcd 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -139,6 +139,9 @@ class Task(futures._PyFuture): # Inherit Python Task implementation
def get_coro(self):
return self._coro
+ def get_context(self):
+ return self._context
+
def get_name(self):
return self._name