mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
PY-57217 Breakpoints are ignored with Python 3.11
IJ-CR-103963 GitOrigin-RevId: 18faf5bc5c995decc948cbe1314773b0776ffc63
This commit is contained in:
committed by
intellij-monorepo-bot
parent
83e4863ca1
commit
68947cc4dc
@@ -5,7 +5,7 @@ import traceback
|
||||
from _pydev_imps._pydev_saved_modules import threading
|
||||
from _pydevd_bundle.pydevd_constants import get_global_debugger, IS_WINDOWS, IS_MACOS, \
|
||||
IS_JYTHON, IS_PY36_OR_LESSER, IS_PY36_OR_GREATER, IS_PY38_OR_GREATER, \
|
||||
get_current_thread_id
|
||||
get_current_thread_id, IS_PY311_OR_GREATER
|
||||
from _pydev_bundle import pydev_log
|
||||
|
||||
try:
|
||||
@@ -63,6 +63,16 @@ def _is_already_patched(args):
|
||||
def _is_py3_and_has_bytes_args(args):
|
||||
if not isinstance('', type(u'')):
|
||||
return False
|
||||
|
||||
if len(args) == 0:
|
||||
return False
|
||||
|
||||
# PY-57217 Uvicorn with '-reload' flag when starting a new process in Python3.11 passes the path to the interpreter as bytes
|
||||
if IS_PY311_OR_GREATER and isinstance(args[0], bytes):
|
||||
interpreter = args[0].decode('utf-8')
|
||||
if is_python(interpreter):
|
||||
args[0] = interpreter
|
||||
|
||||
for arg in args:
|
||||
if isinstance(arg, bytes):
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user