Skip to content
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

MRG, ENH: macOS 11 compatiblity for STC plots #8959

Merged
merged 4 commits into from
Feb 25, 2021

Conversation

hoechenberger
Copy link
Member

Sets QT_MAC_WANTS_LAYER=1 for STC plots via PyVista / pyvistaqt.

Was required on my system with macOS 11.2.1, Qt 5.12.9, pyqt 5.12.3 (installed from conda-forge)

Previous fix via #8554 didn't cover STC plots.

cc @cbrnr, @GuillaumeFavelier

Sets `QT_MAC_WANTS_LAYER=1` for STC plots via
PyVista.

Was required on my system with macOS 11.2.1, Qt 5.12.9, pyqt 5.12.3
(installed from `conda-forge`)

Previous fix via mne-tools#8554 didn't cover STC plots.

cc @cbrnr, @GuillaumeFavelier
@cbrnr
Copy link
Contributor

cbrnr commented Feb 25, 2021

It's strange that conda-forge is still stuck at this old PyQt version (5.12 was released 2 years ago). Versions >=5.15.2 don't have this problem anymore.

@hoechenberger
Copy link
Member Author

It's strange that conda-forge is still stuck at this old PyQt version

It seems compilation of Qt 5.15 is a blocker :
conda-forge/pyqt-feedstock#98

@hoechenberger
Copy link
Member Author

@GuillaumeFavelier please merge if you think this is okay :)

@@ -112,6 +114,11 @@ def set_3d_backend(backend_name, verbose=None):
_reload_backend(backend_name)
MNE_3D_BACKEND = backend_name

# Qt5 macOS 11 compatibility
if (backend_name == 'pyvista' and sys.platform == 'darwin' and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually don't think the backend name matters, mayavi will have the same problem

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've dropped the pyvista check in 77f36c9

@hoechenberger hoechenberger changed the title ENH: macOS 11 compatiblity for PyVista STC plots ENH: macOS 11 compatiblity for STC plots Feb 25, 2021
@hoechenberger hoechenberger changed the title ENH: macOS 11 compatiblity for STC plots MRG, ENH: macOS 11 compatiblity for STC plots Feb 25, 2021
@@ -86,6 +86,8 @@ Enhancements

- Reading and writing FIFF files whose filenames end with ``_meg.fif.gz``, ``_eeg.fif(.gz)``, and ``_ieeg.fif(.gz)`` doesn't emit a warning anymore; this improves interobaility with BIDS-formatted datasets (:gh:`8868` by `Richard Höchenberger`_)

- macOS 11 compatibility for `~mne.SourceEstimate` plots (:gh:`8959` by `Richard Höchenberger`_)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the changelog entry should explicitly mention that an env var is being created. Even if right now this only affects MNE, it can potentially affect other programs in future so we should communicate it prominently.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that these variables will not be visible to any other applications - only to the current Python interpreter and all subprocesses it might spawn.

Copy link
Member Author

@hoechenberger hoechenberger Feb 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ echo ${FOO}; python -c "import os; os.environ['FOO'] = 'bar'"; echo ${FOO}


$

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Substitute "other programs" with "other Python modules" and the point makes sense though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"other Python modules"

Oh wow, so it's not even global for everything running through the same Python interpreter? Crazy :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I meant Dan's point stands -- it will affect those

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've improved the change log entry. Feel free to merge if you're happy!

@drammock drammock merged commit 5ea4bda into mne-tools:main Feb 25, 2021
@drammock
Copy link
Member

Tx @hoechenberger !

@hoechenberger hoechenberger deleted the pyvista-stc-macos-11 branch February 25, 2021 15:18
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.

4 participants