Skip to content

Commit 85079d2

Browse files
authored
Merge branch 'main' into sanity_checks
2 parents 43b0b8f + f37f425 commit 85079d2

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25+
2526
os: [ubuntu-22.04, ubuntu-24.04, macos-14]
27+
2628
build_type: [static_build, shared_build]
2729

2830
steps:

include/xeus-python/xeus_python_config.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// Project version
1515
#define XPYT_VERSION_MAJOR 0
1616
#define XPYT_VERSION_MINOR 17
17-
#define XPYT_VERSION_PATCH 6
17+
#define XPYT_VERSION_PATCH 8
1818

1919
// Composing the version string from major, minor and patch
2020
#define XPYT_CONCATENATE(A, B) XPYT_CONCATENATE_IMPL(A, B)

src/xinterpreter.cpp

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,21 +303,32 @@ namespace xpyt
303303
{"url", "https://xeus-python.readthedocs.io"}
304304
});
305305

306-
return xeus::create_info_reply(
307-
"5.3", // protocol_version
306+
bool has_debugger = (PY_MAJOR_VERSION != 3) || (PY_MAJOR_VERSION != 13);
307+
nl::json rep = xeus::create_info_reply(
308+
"5.5", // protocol_version - overwrited in xeus core
308309
"xeus-python", // implementation
309310
XPYT_VERSION, // implementation_version
310311
"python", // language_name
311312
PY_VERSION, // language_version
312313
"text/x-python", // language_mimetype
313314
".py", // language_file_extension
314315
"ipython" + std::to_string(PY_MAJOR_VERSION), // pygments_lexer
315-
R"({"name": "ipython", "version": )" + std::to_string(PY_MAJOR_VERSION) + "}", // language_codemirror_mode
316+
R"({"name": "ipython", "version": )" + std::to_string(PY_MAJOR_VERSION) + "}",
316317
"python", // language_nbconvert_exporter
317318
banner, // banner
318-
(PY_MAJOR_VERSION != 3) || (PY_MINOR_VERSION != 13), // debugger
319+
has_debugger, // debugger
319320
help_links // help_links
320321
);
322+
// use a dict, string seems to be not supported by the frontend
323+
rep["language_info"]["codemirror_mode"] = nl::json::object({
324+
{"name", "ipython"},
325+
{"version", PY_MAJOR_VERSION}
326+
});
327+
if (has_debugger)
328+
{
329+
rep["supported_features"] = nl::json::array({"debugger"});
330+
}
331+
return rep;
321332
}
322333

323334
void interpreter::shutdown_request_impl()

0 commit comments

Comments
 (0)