From d48f5a35abc1eb40d632f30c5a2191251a765e06 Mon Sep 17 00:00:00 2001 From: Joan Fontanals Date: Fri, 20 Sep 2024 11:03:12 +0200 Subject: [PATCH] fix: rewrite compatible (#6202) --- jina/serve/executors/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jina/serve/executors/__init__.py b/jina/serve/executors/__init__.py index 9e00c8e77a98f..47ee7d6c22ffd 100644 --- a/jina/serve/executors/__init__.py +++ b/jina/serve/executors/__init__.py @@ -655,11 +655,11 @@ def _validate_sagemaker(self): return def _add_dynamic_batching(self, _dynamic_batching: Optional[Dict]): - import collections + from collections.abc import Mapping def deep_update(source, overrides): for key, value in overrides.items(): - if isinstance(value, collections.Mapping) and value: + if isinstance(value, Mapping) and value: returned = deep_update(source.get(key, {}), value) source[key] = returned else: