| 939 | _comments.del_comment(self, key) |
| 940 | |
| 941 | def __getstate__(self): |
| 942 | # Ephemeral-child bookkeeping (a reference to the parent) must never be pickled |
| 943 | state = self.__dict__.copy() |
| 944 | config = state.get("_box_config") |
| 945 | if config is not None and "__pending_parent" in config: |
| 946 | state["_box_config"] = {k: v for k, v in config.items() if k != "__pending_parent"} |
| 947 | return state |
| 948 | |
| 949 | def __setitem__(self, key, value): |
| 950 | if key != "_box_config" and self._box_config["frozen_box"] and self._box_config["__created"]: |