Skip to content

DEV: Extend deprecated decorator

Ugo Nwosu requested to merge enhance-deprecated-decorator into master

Checklist

This MR extends the ase.utils.deprecated decorator so that one can

  1. conditionally omit deprecation warnings based on the context of the calling function and
  2. adjust the arguments of deprecated function.

Use cases include when one might want to deprecate calling a function with positional arguments or normalize constructor arguments prior to assigning object attributes.

I think these changes will be useful given the number of API changes made since the last release.

Edited by Ugo Nwosu

Merge request reports