From 7f6418ac7e8a7cb988685a36c342c75a841c51a9 Mon Sep 17 00:00:00 2001 From: s-heppner Date: Tue, 14 Jul 2026 15:35:11 +0200 Subject: [PATCH] adapter.json: Remove duplicate `@classmethod` Previously, `_construct_blob` in `json_deserialization.py` was decorated with `@classmethod` twice, producing a `classmethod(classmethod(func))` wrapper. On Python 3.10 and 3.12 (used in CI) this went unnoticed, because `classmethod` chained through the inner descriptor and still resolved to a callable bound method. Python 3.13 removed that descriptor chaining, so accessing `cls._construct_blob` now yields a raw, non-callable `classmethod` object. As a result, deserializing any `Blob` raised `TypeError: 'classmethod' object is not callable`, breaking JSON deserialization and the AASX round-trip tests on 3.13. This change removes the redundant decorator so `_construct_blob` behaves like all other constructor methods. This finding motivated #594. --- sdk/basyx/aas/adapter/json/json_deserialization.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/basyx/aas/adapter/json/json_deserialization.py b/sdk/basyx/aas/adapter/json/json_deserialization.py index d3479b2c..e6fc9b44 100644 --- a/sdk/basyx/aas/adapter/json/json_deserialization.py +++ b/sdk/basyx/aas/adapter/json/json_deserialization.py @@ -692,7 +692,6 @@ def _construct_submodel_element_list(cls, dct: Dict[str, object], object_class=m ret.value.add(element) return ret - @classmethod @classmethod def _construct_blob(cls, dct: Dict[str, object], object_class=model.Blob) -> model.Blob: ret = object_class(