databricks-sdk-py
databricks-sdk-py copied to clipboard
[ISSUE] Error with w.shares.share_permissions function / PermissionsList class not defined
Description An error is triggered when using the shares.share_permissions() function.
NameError: name 'PermissionsList' is not defined.
Reproduction Call the shares.share_permissions() function against any named share.
Expected behavior The function returns a list of permissions to the share including recipient name and access level (SELECT).
Is it a regression? ??
Additional context
This is fixed by importing the PermissionsList class in sharing.py.
from databricks.sdk.service.catalog import PermissionsList
:+1: we just ran into this as well!
You can temporarily work around this by patching the modules at runtime (🤮):
import databricks.sdk.service.sharing
from databricks.sdk.service.catalog import PermissionsList
databricks.sdk.service.sharing.__dict__['PermissionsList'] = PermissionsList