Skip to content

Commit

Permalink
Upgraded to xeus-python-shell 0.6.3 (#626)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanMabille authored Jun 3, 2024
1 parent 47cf95c commit 0bc5e36
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- nlohmann_json=3.11.3
- pybind11>=2.6.1,<3.0
- pybind11_json>=0.2.6,<0.3
- xeus-python-shell>=0.5.0,<0.6
- xeus-python-shell>=0.6.3,<0.7
- debugpy>=1.6.5
# Test dependencies
- pytest
Expand Down
2 changes: 1 addition & 1 deletion environment-wasm-host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- numpy
- xeus-lite
- xeus
- xeus-python-shell>=0.5
- xeus-python-shell>=0.6.3
- pyjs>=2.0.0
- requests-wasm-polyfill>=0.3.0
- libpython
1 change: 1 addition & 0 deletions include/xeus-python/xinterpreter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ namespace xpyt
private:

virtual void instanciate_ipython_shell();
virtual bool use_jedi_for_completion() const;
};
}

Expand Down
4 changes: 4 additions & 0 deletions include/xeus-python/xinterpreter_wasm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ namespace xpyt
protected:

void configure_impl() override;

private:

bool use_jedi_for_completion() const override;
};

}
Expand Down
6 changes: 5 additions & 1 deletion src/xinterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ namespace xpyt

instanciate_ipython_shell();

m_ipython_shell_app.attr("initialize")();
m_ipython_shell_app.attr("initialize")(use_jedi_for_completion());
m_ipython_shell = m_ipython_shell_app.attr("shell");

// Setting kernel property owning the CommManager and get_parent
Expand Down Expand Up @@ -383,4 +383,8 @@ namespace xpyt
m_ipython_shell_app = py::module::import("xeus_python_shell.shell").attr("XPythonShellApp")();
}

bool interpreter::use_jedi_for_completion() const
{
return true;
}
}
4 changes: 4 additions & 0 deletions src/xinterpreter_wasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ namespace xpyt
py::module::import("pyjs");
}

bool wasm_interpreter::use_jedi_for_completion() const
{
return false;
}
}

0 comments on commit 0bc5e36

Please sign in to comment.