In the scope construction documentation the object GCSCollectionScopeBuilder is referenced. This was renamed to GCSCollectionScopes in V4.
The call TransferScopes.all.with_dependency(data_access_scope, optional=True) is also incorrect, optional is no longer an accepted keyword.
The correct example should be:
from globus_sdk.scopes import GCSCollectionScopes, TransferScopes
MAPPED_COLLECTION_ID = "...ID HERE..."
# create the scope object, and get the data_access_scope as a string
data_access_scope = GCSCollectionScopes(MAPPED_COLLECTION_ID).data_access
# add data_access as an optional dependency
transfer_scope = TransferScopes.all.with_dependency(data_access_scope)
In the scope construction documentation the object
GCSCollectionScopeBuilderis referenced. This was renamed toGCSCollectionScopesin V4.The call
TransferScopes.all.with_dependency(data_access_scope, optional=True)is also incorrect,optionalis no longer an accepted keyword.The correct example should be: