mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-65243 Obey PYDEVD_USE_CYTHON environment variable when importing tracing module for Python 3.12
GitOrigin-RevId: cd153cf56d18c3bc3858f31259d8a8252314578e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0825460b0a
commit
502793eddc
@@ -1,9 +1,17 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
try:
|
||||
from _pydevd_bundle import pydevd_pep_669_tracing_cython as mod
|
||||
except ImportError:
|
||||
use_cython = os.getenv('PYDEVD_USE_CYTHON', None)
|
||||
|
||||
if use_cython == 'NO':
|
||||
from _pydevd_bundle import pydevd_pep_669_tracing as mod
|
||||
elif use_cython == 'YES':
|
||||
from _pydevd_bundle import pydevd_pep_669_tracing_cython as mod
|
||||
else:
|
||||
try:
|
||||
from _pydevd_bundle import pydevd_pep_669_tracing_cython as mod
|
||||
except ImportError:
|
||||
from _pydevd_bundle import pydevd_pep_669_tracing as mod
|
||||
|
||||
sys.modules['_pydevd_bundle.pydevd_pep_669_tracing'] = mod
|
||||
|
||||
|
||||
Reference in New Issue
Block a user