Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#3770] Fix(client-python): fix protected-access issue (#3798)

Liang Chunba6588f6ceb4
diff --git a/clients/client-python/gravitino/dto/dto_converters.py b/clients/client-python/gravitino/dto/dto_converters.py
index a131db954a..294c0aa430 100644
--- a/clients/client-python/gravitino/dto/dto_converters.py
+++ b/clients/client-python/gravitino/dto/dto_converters.py
@@ -64,6 +64,6 @@ class DTOConverters:
change.property(), change.value()
)
if isinstance(change, CatalogChange.RemoveProperty):
- return CatalogUpdateRequest.RemoveCatalogPropertyRequest(change._property)
+ return CatalogUpdateRequest.RemoveCatalogPropertyRequest(change.property())
raise ValueError(f"Unknown change type: {type(change).__name__}")
diff --git a/clients/client-python/gravitino/dto/metalake_dto.py b/clients/client-python/gravitino/dto/metalake_dto.py
index dfdb8573ae..bbfdd0904a 100644
--- a/clients/client-python/gravitino/dto/metalake_dto.py
+++ b/clients/client-python/gravitino/dto/metalake_dto.py
@@ -49,10 +49,10 @@ class MetalakeDTO(Metalake, DataClassJsonMixin):
if not isinstance(other, MetalakeDTO):
return False
return (
- self._name == other._name
- and self._comment == other._comment
- and self.property_equal(self._properties, other._properties)
- and self._audit == other._audit
+ self.name() == other.name()
+ and self.comment() == other.comment()
+ and self.property_equal(self.properties(), other.properties())
+ and self.audit_info() == other.audit_info()
)
def property_equal(self, p1, p2):
diff --git a/clients/client-python/pylintrc b/clients/client-python/pylintrc
index cefcf09bfb..431bd64675 100644
--- a/clients/client-python/pylintrc
+++ b/clients/client-python/pylintrc
@@ -26,7 +26,6 @@ disable=missing-class-docstring,
broad-exception-caught, #TODO-fix
duplicate-code, #TODO-fix
invalid-field-call, #TODO-fix
- protected-access, #TODO-fix
too-many-arguments, #TODO-fix
[LOGGING]