Files
openide/python/helpers/pydev/_pydevd_bundle/pydevd_asyncio_provider.py
Egor.Eliseev 9d5bf3eac3 PY-62467 TypeError: 'Task' object is not callable debugging uvloop with asyncio support enabled
Fix `asyncio` patching check.
Since other libraries (`uvloop`) can replace an event loop later than our first entry to `pydevd_nest_asyncio.py`,
it is necessary to check the success of the patching every time when we use the asyncio library.


Merge-request: IJ-MR-127646
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: e9b907ed0020e48cb7c29c18b000d46baee9f6cb
2024-03-06 14:19:51 +00:00

40 lines
974 B
Python

# Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
def get_apply():
try:
from pydevd_nest_asyncio import apply
return apply
except:
return None
def get_eval_async_expression_in_context():
try:
from pydevd_asyncio_utils import eval_async_expression_in_context
return eval_async_expression_in_context
except:
return None
def get_eval_async_expression():
try:
from pydevd_asyncio_utils import eval_async_expression
return eval_async_expression
except:
return None
def get_exec_async_code():
try:
from pydevd_asyncio_utils import exec_async_code
return exec_async_code
except:
return None
def get_asyncio_command_compiler():
try:
from pydevd_asyncio_utils import asyncio_command_compiler
return asyncio_command_compiler
except:
return None