jupyter / jupyter_client

Jupyter protocol client APIs
https://jupyter-client.readthedocs.io
BSD 3-Clause "New" or "Revised" License
390 stars 284 forks source link

jupyter-run: avoid traceback for NoSuchKernel #994

Closed minrk closed 1 month ago

minrk commented 1 year ago

NoSuchKernel used to raise during KernelManager instantiation, but it is now delayed, so our except NoSuchKernel isn't catching the error when it's raised anymore.

Access kernel_spec to ensure it's raised where it will be caught.

Also removes a redundant warning log immediately before raising, which prevents complete handling of NoSuchError and produces unavoidable duplicate logs.

Test added for runapp, both regression for #993 and simple exercise for everything working correctly.

closes #993

minrk commented 1 year ago

need to investigate why the minimum version test doesn't see any output. Hard to compare, since the test jobs don't show what packages are installed, so I can't easily diff or reproduce the envs.

blink1073 commented 1 year ago

The minimum tests use hatch --v run, you can add that to the standard tests to compare.