Skip to content

Commit

Permalink
undo change
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Feb 13, 2024
1 parent 744b973 commit a78d9d6
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/psygnal/_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1120,19 +1120,7 @@ def __getstate__(self) -> dict:
)
dd = {slot: getattr(self, slot) for slot in attrs}
dd["_instance"] = self._instance()
dd["_slots"] = [
x
for x in self._slots
if (
isinstance(x, StrongFunction)
# HACK
# this is a hack to retain the ability of a deep-copied signal group
# to connect to all signals in the group.
# reconsider this mechanism. It could also be achieved more directly
# as a special __deepcopy__ method on SignalGroup
or getattr(x, "_obj_qualname", None) == "SignalRelay._slot_relay"
)
]
dd["_slots"] = [x for x in self._slots if isinstance(x, StrongFunction)]
if len(self._slots) > len(dd["_slots"]):
warnings.warn(
"Pickling a SignalInstance does not copy connected weakly referenced "
Expand Down

0 comments on commit a78d9d6

Please sign in to comment.