From c93f811996003781c8c4cd99f156d03293a3be4f Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Mon, 3 Jun 2024 10:15:05 +0200 Subject: [PATCH 1/3] updating xeus --- environment-dev.yml | 6 +++--- include/xeus-sqlite/xeus_sqlite_interpreter.hpp | 11 +++++------ src/xeus_sqlite_interpreter.cpp | 13 ++++++------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/environment-dev.yml b/environment-dev.yml index 4708311..256a94e 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -7,14 +7,14 @@ dependencies: - cxx-compiler # Host dependencies - nlohmann_json - - xtl - cppzmq - - xeus-zmq=1.1.1 + - xeus>=5.0.0,<=6.0 + - xeus-zmq - sqlite - sqlitecpp - cpp-tabulate=1.5 - xvega=0.0.10 - - xproperty=0.11.0 + - xproperty>=0.12.0 - xvega-bindings=0.0.10 # Test dependencies - pytest diff --git a/include/xeus-sqlite/xeus_sqlite_interpreter.hpp b/include/xeus-sqlite/xeus_sqlite_interpreter.hpp index 91eb437..78654de 100644 --- a/include/xeus-sqlite/xeus_sqlite_interpreter.hpp +++ b/include/xeus-sqlite/xeus_sqlite_interpreter.hpp @@ -39,12 +39,11 @@ namespace xeus_sqlite std::string m_db_path; void configure_impl() override; - nl::json execute_request_impl(int execution_counter, - const std::string& code, - bool silent, - bool store_history, - nl::json user_expressions, - bool allow_stdin) override; + void execute_request_impl(send_reply_callback cb, + int execution_counter, + const std::string& code, + xeus::execute_request_config config, + nl::json user_expressions) override; nl::json complete_request_impl(const std::string& code, int cursor_pos) override; nl::json inspect_request_impl(const std::string& code, diff --git a/src/xeus_sqlite_interpreter.cpp b/src/xeus_sqlite_interpreter.cpp index a1280f6..5619b46 100644 --- a/src/xeus_sqlite_interpreter.cpp +++ b/src/xeus_sqlite_interpreter.cpp @@ -368,12 +368,11 @@ namespace xeus_sqlite } } - nl::json interpreter::execute_request_impl(int execution_counter, - const std::string& code, - bool /*silent*/, - bool /*store_history*/, - nl::json /*user_expressions*/, - bool /*allow_stdin*/) + void interpreter::execute_request_impl(send_reply_callback cb, + int execution_counter, + const std::string& code, + xeus::execute_request_config /*config*/, + nl::json /*user_expressions*/) { std::vector traceback; nl::json jresult; @@ -446,7 +445,7 @@ namespace xeus_sqlite publish_execution_error(jresult["ename"], jresult["evalue"], traceback); traceback.clear(); } - return jresult; + cb(jresult); } nl::json interpreter::complete_request_impl(const std::string& raw_code, From 05088e2ddd31d1f94b189a0504cb237c8d56a9e7 Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Mon, 3 Jun 2024 10:17:04 +0200 Subject: [PATCH 2/3] relax requirements --- environment-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment-dev.yml b/environment-dev.yml index 256a94e..8da0295 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -13,7 +13,7 @@ dependencies: - sqlite - sqlitecpp - cpp-tabulate=1.5 - - xvega=0.0.10 + - xvega - xproperty>=0.12.0 - xvega-bindings=0.0.10 # Test dependencies From ff6a553dfe7f525ccd32c48f9e6865545ee11115 Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Tue, 11 Jun 2024 09:14:07 +0200 Subject: [PATCH 3/3] updated xeus --- environment-dev.yml | 6 +++--- src/main.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/environment-dev.yml b/environment-dev.yml index 8da0295..fa87ef0 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -9,13 +9,13 @@ dependencies: - nlohmann_json - cppzmq - xeus>=5.0.0,<=6.0 - - xeus-zmq + - xeus-zmq>=3.0.0,<=4.0 - sqlite - sqlitecpp - cpp-tabulate=1.5 - - xvega + - xvega>=0.1.0 - xproperty>=0.12.0 - - xvega-bindings=0.0.10 + - xvega-bindings>=0.1.0 # Test dependencies - pytest - jupyter_kernel_test diff --git a/src/main.cpp b/src/main.cpp index c11af2d..4f8a1de 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,7 +20,9 @@ #include "xeus/xkernel.hpp" #include "xeus/xkernel_configuration.hpp" -#include "xeus-zmq/xserver_shell_main.hpp" + +#include "xeus-zmq/xserver_zmq_split.hpp" +#include "xeus-zmq/xzmq_context.hpp" #include "xeus-sqlite/xeus_sqlite_interpreter.hpp" #include "xeus-sqlite/xeus_sqlite_config.hpp" @@ -97,7 +99,7 @@ int main(int argc, char* argv[]) // Load configuration file std::string file_name = extract_filename(argc, argv); - auto context = xeus::make_context(); + std::unique_ptr context = xeus::make_zmq_context(); // Create interpreter instance using interpreter_ptr = std::unique_ptr;