-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
get_entry_point
: add proper deprecation pathway for old entry points (
#5206) All entry points that ship with aiida-core were deprecated for v2.0 as they were changed to be properly prefixed with core.. To make sure the old entry points would still be automatically loaded, the factories were updated to automatically catch them, print a deprecation warning, and load the new entry point instead. However, the factory was not the correct place to put this logic, since the `get_entry_point` method, which the factories call and is the lowest function in the stack that actually retrieves the entry point, can also be called directly, circumventing the deprecation mechanic added to the factories. This would result in the deprecated entry points raising an exception when being loaded, for example in the parameter types of the command line that have support for specific entry points, such as the `IdentifierParamType`. The solution is to move the deprecation mechanic from the factories to the lowest layer of `get_entry_point`.
- Loading branch information
Showing
3 changed files
with
81 additions
and
54 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