diff options
-rw-r--r-- | README.rst | 2 | ||||
-rw-r--r-- | gitlab/base.py | 2 | ||||
-rw-r--r-- | gitlab/tests/test_base.py | 1 | ||||
-rw-r--r-- | gitlab/v4/objects.py | 2 |
4 files changed, 4 insertions, 3 deletions
@@ -32,7 +32,7 @@ Requirements python-gitlab depends on: * `python-requests <http://docs.python-requests.org/en/latest/>`_ -* `six <https://pythonhosted.org/six/>`_ +* `six <https://six.readthedocs.io/>`_ Install with pip ---------------- diff --git a/gitlab/base.py b/gitlab/base.py index d2e44b8..f81d039 100644 --- a/gitlab/base.py +++ b/gitlab/base.py @@ -52,7 +52,7 @@ class RESTObject(object): def __setstate__(self, state): module_name = state.pop("_module_name") self.__dict__.update(state) - self._module = importlib.import_module(module_name) + self.__dict__["_module"] = importlib.import_module(module_name) def __getattr__(self, name): try: diff --git a/gitlab/tests/test_base.py b/gitlab/tests/test_base.py index 2526bee..47eda6c 100644 --- a/gitlab/tests/test_base.py +++ b/gitlab/tests/test_base.py @@ -93,6 +93,7 @@ class TestRESTObject(unittest.TestCase): self.assertIsInstance(unpickled, FakeObject) self.assertTrue(hasattr(unpickled, "_module")) self.assertEqual(unpickled._module, original_obj_module) + pickled2 = pickle.dumps(unpickled) def test_attrs(self): obj = FakeObject(self.manager, {"foo": "bar"}) diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index c7edae6..74157f2 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -3786,7 +3786,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject): ("wikis", "ProjectWikiManager"), ) - @cli.register_custom_action("Project", tuple(), ("path", "ref")) + @cli.register_custom_action("Project", tuple(), ("path", "ref", "recursive")) @exc.on_http_error(exc.GitlabGetError) def repository_tree(self, path="", ref="", recursive=False, **kwargs): """Return a list of files in the repository. |