picos.legacy

Backwards-compatibility and deprecation helpers.

Functions

picos.legacy.deprecated(since, reason=None, useInstead=None, decoratorLevel=0)[source]

Decorate a deprecated function or method.

Parameters
  • reason (str) – Textual deprecation reason.

  • useInstead (str) – Alternative to the deprecated object.

  • decoratorLevel (int) – If not the only decorator, number of decorators above this one that add to the stack level of a warning thrown.

picos.legacy.map_legacy_options(options={}, **kwOptions)[source]

Map deprecated solver options to those replacing them.

picos.legacy.throw_deprecation_warning(reason, decoratorLevel=0)[source]

Raise a deprecation warning.