Extra data that is not part of the standard pydantic fields. For compatibility with pydantic v1.
(self)
| 127 | |
| 128 | @property |
| 129 | def extra(self) -> dict[str, Any]: |
| 130 | """Extra data that is not part of the standard pydantic fields. |
| 131 | |
| 132 | For compatibility with pydantic v1. |
| 133 | """ |
| 134 | # extract extra data from attributes set except used slots |
| 135 | # we need to call super in advance due to |
| 136 | # comprehension not inlined in cpython < 3.12 |
| 137 | # https://peps.python.org/pep-0709/ |
| 138 | slots = super().__slots__ |
| 139 | return {k: v for k, v in self._attributes_set.items() if k not in slots} |
| 140 | |
| 141 | @classmethod |
| 142 | def _inherit_construct( |