From 5d6deaeec236730074bfa5a34000c19435dde9ff Mon Sep 17 00:00:00 2001 From: "Bala.FA" Date: Tue, 25 Nov 2025 22:11:40 +0530 Subject: [PATCH] fix object_size/headers in ComposeSource This patch fixes recursion when using object_size and headers properties in ComposeSource Signed-off-by: Bala.FA --- minio/commonconfig.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/minio/commonconfig.py b/minio/commonconfig.py index 88729d12..9514c725 100644 --- a/minio/commonconfig.py +++ b/minio/commonconfig.py @@ -401,22 +401,22 @@ def build_headers(self, object_size: int, etag: str): @property def object_size(self) -> Optional[int]: """Get object size.""" - if self.object_size is None: + if self._object_size is None: raise MinioException( "build_headers() must be called prior to " "this method invocation", ) - return self.object_size + return self._object_size @property def headers(self) -> dict[str, str]: """Get headers.""" - if self.headers is None: + if self._headers is None: raise MinioException( "build_headers() must be called prior to " "this method invocation", ) - return self.headers.copy() + return self._headers.copy() @classmethod def of(cls: Type[F], src: ObjectConditionalReadArgs) -> F: