MAINT: Migrate from PyQt5 to PySide6#510
Conversation
Codecov Report
@@ Coverage Diff @@
## main #510 +/- ##
==========================================
+ Coverage 95.36% 95.37% +0.01%
==========================================
Files 69 69
Lines 2781 2791 +10
Branches 397 400 +3
==========================================
+ Hits 2652 2662 +10
Misses 65 65
Partials 64 64
|
| def run_script_and_check(test_file_path): | ||
| with open(test_file_path) as fid: | ||
| with open(test_file_path) as fid, warnings.catch_warnings(): | ||
| # Ignore deprecation warning caused by |
There was a problem hiding this comment.
I added this workaround in order to attempt to fix these kind of failures which are caused by a warning that originates from https://github.com/mne-tools/mne-python/blob/cecbf0fb1dc919254bb6095db491b2d7c5f68003/mne/viz/backends/_utils.py#L164
Do you have a better suggestion on how to mitigate this? Maybe we could submit a patch to upstream?
There was a problem hiding this comment.
Yes a fix in MNE-Python would be appreciated!
There was a problem hiding this comment.
What should a fix look like for this? I guess we can't remove the code because MNE-Python still needs to support previous versions of Qt? And it feels dangerous to catch and ignore the errors in MNE-Python. Any suggestions @larsoner ?
There was a problem hiding this comment.
In MNE we should check the Qt version and set this attribute conditionally. Or do whatever the Qt deprecation says we should do for new enough versions (set a different attribute, no need to set anything, etc. -- I haven't read what they say to do yet)
There was a problem hiding this comment.
... and here you could conditionally catch warnings or not depending on the MNE and/or At version if you want
093e679 to
13d4819
Compare
Fixes #471 by:
PyQt5withpyside6inrequirements.txtwhich is also used by Circle CI / Azure pipelinesPyQt6withpyside6for github workflowsContributed with ❤️ by AE Studio