Skip to content

Conversation

@cbrnr
Copy link
Contributor

@cbrnr cbrnr commented Jan 19, 2022

Fixes #10197. Do we want to move the function to a different module?

@hoechenberger
Copy link
Member

Do we want to move the function to a different module?

Maybe somewhere inside the mne.utils namespace would be good?

Copy link
Member

@hoechenberger hoechenberger left a comment

Choose a reason for hiding this comment

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

LGTM once we go green!! Thanks @cbrnr

@cbrnr
Copy link
Contributor Author

cbrnr commented Jan 19, 2022

We have a circular import here, the problem is that in check.py we from ..fixes import _median_complex, and in fixes.py we from .utils import _compare_version.

We could nicely resolve this if we get rid of the _median_complex fix, which has already been fixed upstream I think (scipy/scipy#12676). However, I think this was released in SciPy 1.7, and we currently support >= 1.4.1. I think this fix has also been backported, but I'm not sure which versions received the fix. So should we bump the minimum SciPy version, and if yes, to which version? @larsoner

@larsoner
Copy link
Member

Let's move _compare_version back to fixes.py -- we don't want fixes.py to import from any other mne namespace for exactly this reason. It's nice to know everything in there is always safe to use with no risk of circular import

@cbrnr cbrnr force-pushed the packaging-version branch from ecbf0d1 to d698ea8 Compare January 19, 2022 18:51
@cbrnr
Copy link
Contributor Author

cbrnr commented Jan 19, 2022

All green!

@hoechenberger hoechenberger merged commit 89e163f into mne-tools:main Jan 19, 2022
@hoechenberger
Copy link
Member

Perfect, thanks, @cbrnr!

@cbrnr cbrnr deleted the packaging-version branch January 19, 2022 20:42
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.

Use packaging.version for comparing versions

3 participants