Repository navigation
Fix qt warnings - #473
Open
jenshnielsen wants to merge 2 commits into
Open
Fix qt warnings#473jenshnielsen wants to merge 2 commits into
jenshnielsen wants to merge 2 commits into
Conversation
Recent PySide6 emits a RuntimeWarning instead of raising TypeError when disconnecting a slot that is not connected, so the try/except TypeError guards no longer keep this quiet. - PlotWithColorbar: connect colorbar.sigLevelsChanged to _colorScatterPoints once in __init__ (it is a no-op without a scatter plot) instead of disconnecting on every clearPlot. - FittingGui: only connect the freshly built param-option signals when live update is on, rather than disconnecting never-connected signals. Also drive live update from QCheckBox.toggled(bool): with PySide6, stateChanged emits an int that never equals Qt.Checked, so checking the box disabled live update (and disconnected unconnected slots).
Forking the multi-threaded (Qt) pytest process raises "This process is multi-threaded, use of fork() may lead to deadlocks in the child" DeprecationWarning on Linux with Python >= 3.12. Use the spawn start method on all platforms (Windows already used it).
jenshnielsen
force-pushed
the
fix_qt_warnings
branch
from
October 5, 2026 08:19
f7c1881 to
d2e0d94
Compare
jenshnielsen
marked this pull request as ready for review
October 6, 2026 06:54
astafan8
approved these changes
Oct 6, 2026
jenshnielsen
commented
Oct 6, 2026
| liveUpdateCheck.stateChanged.connect(setLiveUpdate) | ||
| # use toggled(bool) rather than stateChanged: depending on the Qt | ||
| # binding, stateChanged emits an int that does not compare equal to | ||
| # the Qt.CheckState enum. |
Collaborator
Author
There was a problem hiding this comment.
I want to manually validate if this is true.
jenshnielsen
commented
Oct 6, 2026
| class _Writer(Process): | ||
| # Use 'spawn' on all platforms: forking the multi-threaded (Qt) test process is | ||
| # unsafe and raises a DeprecationWarning on Linux with Python >= 3.12. | ||
| _mp_context = multiprocessing.get_context("spawn") |
Collaborator
Author
There was a problem hiding this comment.
Are we using fork in the real app? is that an issue?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clean up warnings raised during tests