Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This used to be an old-style class, and the pickle calls the OBJ opcode (which for old-style classes creates an instance without calling __init__) and later the BUILD opcode which calls __setstate__. Now that the class is new-style, the OBJ opcode calls __init__, which breaks because the pickle doesn't include args for __init__. So the workaround here is to make __init__ accept no args (the object dict will still get set by the subsequent BUILD op). Once the new-style object gets re-pickled it will use the NEWOBJ opcode instead of OBJ, so unpickling will only call __new__ and not __init__.
- Loading branch information