aiidateam / aiida-core

The official repository for the AiiDA code
https://aiida-core.readthedocs.io
Other
411 stars 184 forks source link

Prevent outdated deprecation warnings by introducing a version argument into deprecation commands #6458

Open agoscinski opened 3 weeks ago

agoscinski commented 3 weeks ago

Some deprecation messages are not up to date. For example https://github.com/aiidateam/aiida-core/blob/23d2aa5ee3c08438cfc4b4734e9670e19c090150/src/aiida/cmdline/commands/cmd_database.py#L27-L30

In this case it seems like we want to remove the command rather than to increase the version number. I also thought about a mechanism that prevents us missing the removal of deprecated commands in future releases. We could add a version argument to the deprecated command that throws an error when the current version is above the given version of removal, so a new release PR that bumps the version would throw errors until the deprecated commands are really removed.