Remove deprecated aliases overdue since v1.4 (EEGNetv4, SleepStagerEldele2021, TSceptionV1, BNCI2014001)#1045
Open
bkowshik wants to merge 3 commits into
Open
Conversation
EEGNetv4, SleepStagerEldele2021, TSceptionV1, and BNCI2014001 were deprecated in v1.2/v1.3 and scheduled for removal in v1.4 (the messages' v1.12/v1.13/v1.14 were typos). Tree is now 1.6.x, so they are past due. Removes the alias classes, the EEGNetv4 export and model-registry special-case, updates tests to the new names, and adds a whats_new entry.
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.
Summary
Removes four public deprecated aliases that were scheduled for removal in v1.4. The development tree is now
1.6.1dev0(latest release v1.5.1), so these are two minor versions past their planned removal.EEGNetv4EEGNetbraindecode.models(exported)SleepStagerEldele2021AttnSleepbraindecode.models.attn_sleepTSceptionV1TSceptionbraindecode.models.tsinceptionBNCI2014001BNCI2014_001braindecode.datasets.moabbWhy now
Each deprecation message advertised removal in
v1.14(and rename inv1.12/v1.13), which made the removal look far in the future. Those version strings are typos — an extra1was inserted afterv1.:version.pyat the rename commit read1.2.0, and they're documented under the "Current 1.2" section ofwhats_new.rst.BNCI2014001rename actually landed in v1.3.0 (Rename deprecated BNCI2014001 to BNCI2014_001 #826).v1.14.Read correctly, these aliases were due for removal in v1.4. They have now been deprecated for four-plus releases, which is an ample deprecation window, so this PR finishes the job (and removes the misleading version strings in the process).
Migration
Note: only
EEGNetv4was re-exported at the package level (inbraindecode.models.__all__); the other three were only reachable from their submodules.Changes
from mne.utils import deprecatedimports (keptwarnwhere it is still used in the same module).braindecode/models/__init__.py: dropEEGNetv4from the import and from__all__.braindecode/models/util.py: remove theEEGNetv4special-case in_init_models_dict()— it existed only to hide the alias from the model registry.test/unit_tests/models/test_util.py: drop the matchingEEGNetv4exclusion intest_models_dictso the registry/models_dictequality check stays exact.test/unit_tests/models/test_config.py: useEEGNetinstead ofEEGNetv4.docs/whats_new.rst: add an entry under "API and behavior changes" for the current release cycle. Historical changelog entries that mention the old names are left untouched as a record.Testing
pytest test/unit_tests/models/test_util.py test/unit_tests/models/test_config.py→ 136 passed.ruff checkis clean on all modified files (no unused imports, no undefined names)..pysources.Notes
This is a backward-incompatible removal of public API. Happy to retarget it to a specific release if you prefer to batch breaking changes for a particular version.