Helpers for comparing version strings.
Bases: object
A decorator to mark callables as deprecated.
This decorator logs a deprecation message when the callable it decorates is used. The message will include the release where the callable was deprecated, the release where it may be removed and possibly an optional replacement.
Examples:
>>> @deprecated(as_of=deprecated.ICEHOUSE)
... def a(): pass
>>> @deprecated(as_of=deprecated.ICEHOUSE, in_favor_of='f()')
... def b(): pass
>>> @deprecated(as_of=deprecated.ICEHOUSE, remove_in=+1)
... def c(): pass
Determine whether requested_version is satisfied by current_version; in other words, current_version is >= requested_version.
Parameters: |
|
---|---|
Returns: | True if compatible, False if not |