exception psi4.driver.UpgradeHelper(old, new, version, elaboration)[source]

Error called on previously valid syntax that now isn’t and a simple syntax transition is possible.

It is much preferred to leave the old syntax valid for a release cycle and have the old syntax raise a deprecation FutureWarning. For cases where the syntax just has to jump, an UpgradeHelper can be used to trap the old syntax at first error and suggest the new.

An UpgradeHelper can also be used after the FutureWarning described above has expired. Then the body of the code can be deleted while the definition is preserved, and an UpgradeHelper called in place of the body to guide users with lagging syntax.

  • old (str) – Previously valid syntax.

  • new (str) – Suggested replacement syntax.

  • version (str) – First Major.minor version at which old syntax won’t run. Generally the next release at time of commit.

  • elaboration (str) – Any additional message to convey. Should start with a space.