Skip to content

Commit 00bb954

Browse files
committed
Fix serialization problem with incomparable keys in dict
1 parent 1fa6b37 commit 00bb954

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

utbot-python-executor/src/main/python/utbot_executor/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "utbot-executor"
3-
version = "1.9.7"
3+
version = "1.9.8"
44
description = ""
55
authors = ["Vyacheslav Tamarin <vyacheslav.tamarin@yandex.ru>"]
66
readme = "README.md"

utbot-python-executor/src/main/python/utbot_executor/utbot_executor/deep_serialization/memory_objects.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
from __future__ import annotations
22

3-
import copyreg
43
import inspect
54
import logging
5+
import pickle
66
import re
77
import sys
88
import typing
99
from itertools import zip_longest
10-
import pickle
11-
from typing import Any, Callable, Dict, List, Optional, Set, Type, Iterator, Iterable
12-
10+
from typing import Any, Callable, Dict, List, Optional, Set, Type, Iterable
1311
from utbot_executor.deep_serialization.config import PICKLE_PROTO
1412
from utbot_executor.deep_serialization.iterator_wrapper import IteratorWrapper
1513
from utbot_executor.deep_serialization.utils import (
@@ -145,8 +143,8 @@ def initialize(self) -> None:
145143
deserialized_obj = self.deserialized_obj
146144
equals_len = len(self.obj) == len(deserialized_obj)
147145
comparable = equals_len and all(
148-
serializer.get_by_id(value_id).comparable
149-
for value_id in self.items.values()
146+
serializer.get_by_id(value_id).comparable and serializer.get_by_id(key_id).comparable
147+
for key_id, value_id in self.items.items()
150148
)
151149

152150
super()._initialize(deserialized_obj, comparable)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.9.7
1+
1.9.8

0 commit comments

Comments
 (0)