Skip to content

fixes #1594#1595

Merged
jph00 merged 1 commit into
mainfrom
fix/1594
May 20, 2026
Merged

fixes #1594#1595
jph00 merged 1 commit into
mainfrom
fix/1594

Conversation

@KeremTurgutlu
Copy link
Copy Markdown
Contributor

nbdev-test fails with the following error, because faulthandler.register by default uses sys.stderr and it gets changed in execnb ipykernel environment. This PR sets file=sys.__stderr__ which is the source terminal.

(uvws) ~/aai-ws/nbdev (main ✔) nbdev-test
UnsupportedOperation in /Users/keremturgutlu/aai-ws/nbdev/nbs/api/12_test.ipynb:
===========================================================================

While Executing Cell #6:
Traceback (most recent call last):
  File "/Users/keremturgutlu/aai-ws/nbdev/nbdev/test.py", line 55, in test_nb
    k.run_all(nb, exc_stop=True, preproc=_no_eval, verbose=verbose)
  File "/Users/keremturgutlu/aai-ws/execnb/execnb/shell.py", line 252, in run_all
    if self.exc and exc_stop: raise self.exc from None
                              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/keremturgutlu/aai-ws/.venv/lib/python3.12/site-packages/IPython/core/interactiveshell.py", line 3748, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-1-a46277746112>", line 2, in <module>
    success,duration = test_nb(_nb, skip_flags=['notest'])
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<ipython-input-1-058ebeb728be>", line 11, in test_nb
    faulthandler.register(signal.SIGINT, all_threads=True, chain=True)
io.UnsupportedOperation: fileno

@jph00 jph00 merged commit cb3c0c5 into main May 20, 2026
8 checks passed
@jph00 jph00 deleted the fix/1594 branch May 20, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants