(self, state: dict[str, Any])
| 466 | return state |
| 467 | |
| 468 | def __setstate__(self, state: dict[str, Any]) -> None: |
| 469 | self.__dict__.update(state) |
| 470 | self.__connection_lock = threading.Lock() |
| 471 | self.__connection = None |
| 472 | self.__custom_connections = deque() |
| 473 | |
| 474 | @staticmethod |
| 475 | # replace with str.removesuffix once support for Python 3.8 is dropped |