@@ -270,19 +270,6 @@ namespace xpyt
270270
271271 nl::json interpreter::kernel_info_request_impl ()
272272 {
273- nl::json result;
274- result[" implementation" ] = " xeus-python" ;
275- result[" implementation_version" ] = XPYT_VERSION;
276-
277- /* The jupyter-console banner for xeus-python is the following:
278- __ _____ _ _ ___
279- \ \/ / _ \ | | / __|
280- > < __/ |_| \__ \
281- /_/\_\___|\__,_|___/
282-
283- xeus-python: a Jupyter lernel for Python
284- */
285-
286273 std::string banner = " "
287274 " __ _____ _ _ ___\n "
288275 " \\ \\ / / _ \\ | | / __|\n "
@@ -299,22 +286,28 @@ namespace xpyt
299286 " We recommend using a general-purpose package manager instead, such as Conda/Mamba."
300287 " \n " );
301288#endif
302- result[" banner" ] = banner;
303- result[" debugger" ] = (PY_MAJOR_VERSION != 3 ) || (PY_MAJOR_VERSION != 13 );
304-
305- result[" language_info" ][" name" ] = " python" ;
306- result[" language_info" ][" version" ] = PY_VERSION;
307- result[" language_info" ][" mimetype" ] = " text/x-python" ;
308- result[" language_info" ][" file_extension" ] = " .py" ;
309289
310- result[ " help_links" ] = nl::json::array ();
311- result[ " help_links" ][ 0 ] = nl::json::object ({
290+ nl::json help_links = nl::json::array ();
291+ help_links. push_back ({
312292 {" text" , " Xeus-Python Reference" },
313293 {" url" , " https://xeus-python.readthedocs.io" }
314294 });
315295
316- result[" status" ] = " ok" ;
317- return result;
296+ return xeus::create_info_reply (
297+ " " , // protocol_version
298+ " xeus-python" , // implementation
299+ XPYT_VERSION, // implementation_version
300+ " python" , // language_name
301+ PY_VERSION, // language_version
302+ " text/x-python" , // language_mimetype
303+ " .py" , // language_file_extension
304+ " " , // pygments_lexer
305+ " " , // language_codemirror_mode
306+ " " , // language_nbconvert_exporter
307+ banner, // banner
308+ (PY_MAJOR_VERSION != 3 ) || (PY_MAJOR_VERSION != 13 ), // debugger
309+ help_links // help_links
310+ );
318311 }
319312
320313 void interpreter::shutdown_request_impl ()
0 commit comments