We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 262b222 commit b4b5decCopy full SHA for b4b5dec
gitlab/base.py
@@ -52,7 +52,7 @@ def __getstate__(self):
52
def __setstate__(self, state):
53
module_name = state.pop("_module_name")
54
self.__dict__.update(state)
55
- self._module = importlib.import_module(module_name)
+ self.__dict__["_module"] = importlib.import_module(module_name)
56
57
def __getattr__(self, name):
58
try:
gitlab/tests/test_base.py
@@ -93,6 +93,7 @@ def test_pickability(self):
93
self.assertIsInstance(unpickled, FakeObject)
94
self.assertTrue(hasattr(unpickled, "_module"))
95
self.assertEqual(unpickled._module, original_obj_module)
96
+ pickled2 = pickle.dumps(unpickled)
97
98
def test_attrs(self):
99
obj = FakeObject(self.manager, {"foo": "bar"})
0 commit comments