pybmd.decorators.warn_deprecated_calling_convention#
- pybmd.decorators.warn_deprecated_calling_convention(api_name: str, deprecated_in: str, moved_to: str | None = None, stacklevel: int = 3) None[source]#
Warn that the calling convention used to reach an API is deprecated.
Some DaVinci Resolve APIs did not get deprecated as a whole - only one of their calling conventions did (e.g.
SetMetadata(metadataType, metadataValue)versusSetMetadata({metadata})). Which convention was used is only known at call time, so those wrappers call this helper on the legacy path instead of being decorated withrequires_resolve_version(). No constraint is registered in the VersionRegistry, because the method itself stays fully supported.Nothing is warned when the running Resolve version is older than ‘deprecated_in’, or when no Resolve instance has been created yet.
- Parameters:
api_name (str) – Legacy convention identifier, e.g. “MediaPoolItem.set_metadata(metadata_type, metadata_value)”
deprecated_in (str) – Version string the convention was deprecated in (e.g. “21.1.0”)
moved_to (str | None) – Convention to use instead (e.g. “set_metadata({metadata})”)
stacklevel (int) – Stack level the warning points at. The default of 3 blames the caller of the wrapper method.
- Warns:
APIDeprecationWarning – If the running Resolve version deprecates the convention
- Return type:
None