Skip to content

Commit c7358c0

Browse files
committed
Added supported_features to kernel_info_reply
1 parent 2e0605a commit c7358c0

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/xinterpreter.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,9 @@ namespace xpyt
300300
{"url", "https://xeus-python.readthedocs.io"}
301301
});
302302

303-
return xeus::create_info_reply(
304-
"5.3", // protocol_version
303+
bool has_debugger = (PY_MAJOR_VERSION != 3) || (PY_MAJOR_VERSION != 13);
304+
nl::json rep = xeus::create_info_reply(
305+
"5.5", // protocol_version - overwrited in xeus core
305306
"xeus-python", // implementation
306307
XPYT_VERSION, // implementation_version
307308
"python", // language_name
@@ -312,9 +313,16 @@ namespace xpyt
312313
R"({"name": "ipython", "version": )" + std::to_string(PY_MAJOR_VERSION) + "}", // language_codemirror_mode
313314
"python", // language_nbconvert_exporter
314315
banner, // banner
315-
(PY_MAJOR_VERSION != 3) || (PY_MINOR_VERSION != 13), // debugger
316+
has_debugger, // debugger
316317
help_links // help_links
317318
);
319+
320+
if (has_debugger)
321+
{
322+
rep["supported_features"] = nl::json::array({"debugger"});
323+
}
324+
325+
return rep;
318326
}
319327

320328
void interpreter::shutdown_request_impl()

0 commit comments

Comments
 (0)