diff --git environment-dev.yml environment-dev.yml index 4708311..fa87ef0 100644 --- environment-dev.yml +++ environment-dev.yml @@ -7,15 +7,15 @@ dependencies: - cxx-compiler # Host dependencies - nlohmann_json - - xtl - cppzmq - - xeus-zmq=1.1.1 + - xeus>=5.0.0,<=6.0 + - xeus-zmq>=3.0.0,<=4.0 - sqlite - sqlitecpp - cpp-tabulate=1.5 - - xvega=0.0.10 - - xproperty=0.11.0 - - xvega-bindings=0.0.10 + - xvega>=0.1.0 + - xproperty>=0.12.0 + - xvega-bindings>=0.1.0 # Test dependencies - pytest - jupyter_kernel_test diff --git include/xeus-sqlite/xeus_sqlite_interpreter.hpp include/xeus-sqlite/xeus_sqlite_interpreter.hpp index 91eb437..78654de 100644 --- include/xeus-sqlite/xeus_sqlite_interpreter.hpp +++ 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 src/main.cpp src/main.cpp index c11af2d..4f8a1de 100644 --- src/main.cpp +++ 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; diff --git src/xeus_sqlite_interpreter.cpp src/xeus_sqlite_interpreter.cpp index a1280f6..5619b46 100644 --- src/xeus_sqlite_interpreter.cpp +++ 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,