-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🩹Fix check_deprecations not showing deprecation warnings (#775)
* ✨ Added 'deprecate_dict_entry' to deprecate dict keys and/or values * 🧹📚 Changed Warns OverDueDeprecation to Raises and added missing Raises OverDueDeprecation to deprecate_module_attribute and deprecate_submodule * 🩹🧪 Reimplemented check_deprecations and with deprecate_dict_entry and renamed it to 'model_spec_deprecations' This change also ensures that the deprecation warning is thrown when users calls 'load_model' so python will show the warning * ♻️🧪 Changed deprecation_warning_on_call_test_helper to test for file emitting the warning and return the WarningsRecorder * 📚 Added docs for deprecate_dict_entry * 🧹 Removed unused record variables * 🧪 Added test for deprecated 'spectral_constraints' * 👌 Changed DeprecationWarning to GlotaranApiDeprecationWarning (GlotaranApiDeprecationWarning is a subclass of UserWarning so it won't be filtered automatically by python) * 📚 Updated docs to reflect the usage of GlotaranApiDeprecationWarning
- Loading branch information
Showing
14 changed files
with
546 additions
and
117 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
"""Deprecation helpers and place to put deprecated implementations till removing.""" | ||
from glotaran.deprecation.deprecation_utils import deprecate | ||
from glotaran.deprecation.deprecation_utils import deprecate_dict_entry | ||
from glotaran.deprecation.deprecation_utils import deprecate_module_attribute | ||
from glotaran.deprecation.deprecation_utils import deprecate_submodule | ||
from glotaran.deprecation.deprecation_utils import warn_deprecated |
This file contains 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
Oops, something went wrong.