picos.legacy

Backwards-compatibility and deprecation helpers.

Outline

Functions

deprecated

Decorate a deprecated function or method.

map_legacy_options

Map deprecated solver options to those replacing them.

throw_deprecation_warning

Raise a deprecation warning.

Functions

deprecated

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.

map_legacy_options

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

Map deprecated solver options to those replacing them.

throw_deprecation_warning

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

Raise a deprecation warning.