@@ -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