SDK Deprecations
SuperAnnotate periodically deprecates Python SDK methods as newer or more consistent alternatives become available.
A deprecated method remains available for a period of time so you can update your code before the method is removed in a future SDK release.
We recommend reviewing SDK release notes and changelogs whenever upgrading the superannotate package, especially when upgrading across minor versions.
Python deprecation warnings
SDK deprecation notices are implemented using Python's standard DeprecationWarning.
When a deprecated SDK method is called, the warning includes:
- The method being deprecated
- The SDK version in which the method is planned for removal
- The recommended replacement method or methods
For example, a deprecation warning may look like:
DeprecationWarning: This function <deprecated_function>() will be deprecated and removed in version <version>
Recommended replacement: <replacement_function>()Python DeprecationWarnings can be displayed in local Python environments and IDE output when deprecation warnings are enabled.
Show deprecation warnings in Orchestrate Monitoring
Python may suppress DeprecationWarnings by default depending on the runtime configuration.
If you use the SuperAnnotate Python SDK inside an Orchestrate Custom Action, we recommend explicitly enabling deprecation warnings. This allows SDK deprecation notices to also be surfaced in the Custom Action execution logs in Orchestrate Monitoring.
Add the following to your Custom Action:
import warnings
warnings.simplefilter("always", DeprecationWarning)For example:
import warnings
from superannotate import SAClient
warnings.simplefilter("always", DeprecationWarning)
sa_client = SAClient()With deprecation warnings enabled, calling a deprecated SDK method surfaces the warning in the Custom Action logs together with the planned removal version and recommended replacement.
We recommend enabling
DeprecationWarnings in Custom Actions that depend on the SuperAnnotate Python SDK. This provides additional visibility into upcoming SDK changes before upgrading to a version in which a deprecated method has been removed.
Before upgrading the SDK
Before upgrading the superannotate package, we recommend:
- Review the Python SDK changelog and SuperAnnotate release notes.
- Check for deprecation warnings in your development environment.
- If you use the SDK in Orchestrate, enable Python
DeprecationWarnings in your Custom Actions. - Replace deprecated methods with their recommended alternatives before upgrading to a version in which those methods are removed.
- Test your Custom Action against the new SDK version before deploying the update.
For Custom Actions, an existing built action continues to use the dependencies with which that action was built. Updating the configured SDK dependency and rebuilding the Custom Action causes the action to use the newly installed SDK version.
Upcoming SDK deprecations — version 4.7.0
The following Python SDK methods are scheduled for deprecation as part of SDK 4.7.0.
Recommended format:
| Deprecated method | Recommended replacement | Planned removal version |
|---|---|---|
SAClient.search_folders() | SAClient.list_folders() | 4.7.0 |
SAClient.search_projects() | SAClient.list_projects() | 4.7.0 |
When one of these methods is called, the SDK will emit a Python DeprecationWarning containing the corresponding migration guidance.
We recommend migrating to the replacement methods as soon as practical rather than waiting for the deprecated methods to be removed.
Updated about 1 hour ago