mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
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
40 lines
974 B
Python
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
|