-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OWPythonScript: Replace console #5228
base: master
Are you sure you want to change the base?
Conversation
f857549
to
e3de711
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to ensure that old workflows keep the same functionality. For old workflows, the in-process kernel needs to be used.
To achieve this, the settings version needs to increase in this PR, and then, if old settings are detected, enable the old kernel for that process. If there are other changes to the behavior (I might have missed something), also consider a compatibility mode as in #3810.
This is a serious blocker, but fortunately easy to fix.
2b3a8a4
to
7c3cf63
Compare
I can't run WidgetPreview without this removed. It'll be replaced by a dedicated kernel soon.
For now only uses its pygments stuff in editor. A later PR will implement more with this requirement.
Relies on setting darkMode property in QApplication
7c3cf63
to
7e909f3
Compare
If flicking in-process on and off, before this change, it could get stuck on 'Injecting Variables'
Orange already does its own patching, and does not expose file descriptors for the patched out streams. Even if this functionality is added to orange and canvas-core, many test runners (JetBrains) do not, and the only case handled in the ipykernel library is for pytest.
7e909f3
to
d3a56c2
Compare
12a05ea
to
855a00e
Compare
OWPythonScript PRs:
#5208 -> here
Issue
The console hangs on execution. Also it could be prettier.
Description of changes
Before
After
The console now launches a python kernel in a separate process.
Some new files:
This is variable injection ZMQ stuff between console and kernel. It facilitates a pipe-based IPC (inter-process communication) solution. Makes a great prototype for client/server architecture in Orange. Apparently
ipc://
isn't supported on Windows though TODO.Uses python_serialize.py's OrangeZMQMixin. Also does a lot of work maintaining current state (transferring variables, executing script), also triggering signals that indirectly change the widget's status message.
Uses python_serialize.py's OrangeZMQMixin. Simplest of the bunch, just make sure not to import Qt or Orange here or it hangs the kernel on startup (making it timeout).
I tried making the kernel fast, but if the timeout is an issue, I can extend it. From what I've seen, it only causes a small UI glitch.
Includes