xonsh / xontrib-jupyter

Xonsh jupyter kernel allows to run Xonsh shell code in Jupyter, JupyterLab, Euporia, etc.
MIT License
32 stars 4 forks source link

xontrib fails to load #36

Closed greg-hellings closed 1 month ago

greg-hellings commented 1 month ago

Trying to load the current release 0.3.0 gives the following backtrace:

Traceback (most recent call last):
  File "/nix/store/s9j7pykxfj880hf4yslgslclj6f58c0v-xonsh-0.17.0/lib/python3.11/site-packages/xonsh/xontribs.py", line 246, in xontribs_load
    update_context(name, ctx=ctx, full_module=full_module)
  File "/nix/store/s9j7pykxfj880hf4yslgslclj6f58c0v-xonsh-0.17.0/lib/python3.11/site-packages/xonsh/xontribs.py", line 191, in update_context
    modctx = xontrib_context(name, full_module)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/s9j7pykxfj880hf4yslgslclj6f58c0v-xonsh-0.17.0/lib/python3.11/site-packages/xonsh/xontribs.py", line 157, in xontrib_context
    module = importlib.import_module(spec.name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/6b1fqdwb3g56j5pazv8zkx9qd0mv3wiz-python3-3.11.9/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/nix/store/rlpvim5wpwpnmncngr53hpc48458ydxk-python3.11-xontrib-jupyter-0.3.0/lib/python3.11/site-packages/xontrib/jupyter.py", line 12, in <module>
    @XSH.builtins.events.on_xonfig_info_requested
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/s9j7pykxfj880hf4yslgslclj6f58c0v-xonsh-0.17.0/lib/python3.11/site-packages/xonsh/events.py", line 75, in __call__
    raise ValueError("Event handlers need a **kwargs for future proofing")
ValueError: Event handlers need a **kwargs for future proofingFailed to load xontrib jupyter.

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

greg-hellings commented 1 month ago

I've been able to test the PR locally and it works for me. Hope we can get a new release out soon with it. Thanks!