Issue with porting ipkernel_qtapp to PySide6, event loop doesn't quit

Open
#1,180 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
jupyter, python
Domain
backend, desktop

Research direction

Start with examples/embedding/ipkernel_qtapp.py and the attached ipkernel_pyside6.zip to reproduce the PySide6 event-loop behavior. Compare qapp.quit() with the reported quit() workaround and verify that the embedded app can close normally while the kernel remains usable.

Written by the indexing model from the issue text.

Description

Hello,

I was successfully using in process embedded QtConsole example in my app.
Now, I want to allow jupyter notebooks to connect to my app kernel, so I switched to IPKernelApp like in this example but I can't close anymore My app.
The trick that work is to call quit() from the kernel with self.ipkernel.shell.run_cell("quit()") or from a QtConsole, using qapp.quit() doesn't seems to work anymore.
Here is a patch if someone want to reproduce the issue with ipykernel example:
ipykernel_pyside6.zip

Dominant language
Python
Stars
734
Forks
411
Avg merge
1d 2h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ipython/ipykernel

All issues in ipython/ipykernel

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.