Skip to content

Commit a0ab320

Browse files
authored
Added supported_features in kernel_info_reply (#690)
* Added supported_features to kernel_info_reply * Upgraded OSX images in the CI
1 parent 2e0605a commit a0ab320

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14]
25+
os: [ubuntu-22.04, ubuntu-24.04, macos-14, macos-15]
2626
build_type: [static_build, shared_build]
2727

2828
steps:

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)