Part of bzrlib
Added in bzrlib 0.18 this allows export of compatibility information about bzrlib. Please see doc/developers/api-versioning.txt for design details and examples.
Function | get_current_api_version | Return the API version tuple for object_with_api. |
Function | get_minimum_api_version | Return the minimum API version supported by object_with_api. |
Function | require_api | Check if object_with_api supports the api version wanted_api. |
Function | require_any_api | Check if object_with_api supports the api version wanted_api. |
Added in bzrlib 0.18.
Parameters | object_with_api | An object to look for an API version on. If the object has a api_current_version attribute, that is used. Otherwise if there is a version_info attribute, its first three elements are used. Finally if there was no version_info attribute, the current api version of bzrlib itself is used. |
Added in bzrlib 0.18.
Parameters | object_with_api | An object to look for an API version on. If the object has a api_minimum_version attribute, that is used. Otherwise the minimum api version of bzrlib itself is used. |
Added in bzrlib 0.18.
Parameters | object_with_api | An object which exports an API minimum and current version. See get_minimum_api_version and get_current_api_version for details. |
wanted_api | The API version for which support is required. | |
Returns | None | |
Raises | IncompatibleAPI | When the wanted_api is not supported by object_with_api. |
Added in bzrlib 1.9.
Parameters | object_with_api | An object which exports an API minimum and current version. See get_minimum_api_version and get_current_api_version for details. |
wanted_api | A list of API versions, any of which being available is sufficent. | |
Returns | None | |
Raises | IncompatibleAPI | When the wanted_api is not supported by object_with_api. |