Skip to content

yggdrasil.pickle.ser.complexs

complexs

Backward-compatible re-export façade for the complex serialization layer.

The implementation has been split into four focused modules

libs.py — shared utilities and base serializer classes callables.py — FunctionSerialized / MethodSerialized + helpers dataclasses.py — DataclassSerialized + helpers exceptions.py — BaseExceptionSerialized + traceback helpers

Everything that was previously in this file is re-exported here so that all existing import paths (from yggdrasil.pickle.ser.complexs import …) keep working without modification.

import inspect is kept at module level so that test code that does::

import yggdrasil.pickle.ser.complexs as complexs_module
monkeypatch.setattr(complexs_module.inspect, "getclosurevars", …)

continues to work — patching inspect.getclosurevars through this module attribute affects the shared inspect module object used by callables.py.

BaseExceptionSerialized dataclass module-attribute

BaseExceptionSerialized = get_class(BASE_EXCEPTION) or BaseExceptionSerialized

Serializer for any :class:BaseException subclass.

Wire representation: :attr:Tags.BASE_EXCEPTION (tag 203) followed by a version 2 exception payload (see module docstring for the format).

The deserialized exception carries an additional __serialized_traceback__ attribute — a list of :class:TracebackFrame named-tuples when the original exception had a live traceback, or None otherwise.