10000 Fix Pickle support: dump() after load() fails by bourgesl · Pull Request #826 · python-gitlab/python-gitlab · GitHub
[go: up one dir, main page]

Skip to content

Fix Pickle support: dump() after load() fails #826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

bourgesl
Copy link
Contributor

This is a one-liner fix to pickle support: pickle.dump() fails after pickle.load()

  File "/home/bourgesl/.local/lib/python3.6/site-packages/gitlab/base.py", line 50, in __getstate__
    module = state.pop("_module")
KeyError: '_module'

Reason:
Former self._module call invokes set_attr() that stores '_module' attribute in self.__dict__["_updated_attrs"]["_module"] that is not its correct place: self.__dict__["_module"] as expected by getstate()

@max-wittig
Copy link
Member

@bourgesl Thanks for your contribution. Could you please follow our conventional changelog and squash your commits into one?

@max-wittig
Copy link
Member

@bourgesl I've created a new branch with your commit in it. Thanks again!

@bourgesl bourgesl deleted the pickle_fix branch July 22, 2019 09:44
@bourgesl
Copy link
Contributor Author

Thanks for your help, I did not have time during the week end to squash commits, sorry

@max-wittig
Copy link
Member

No problem. It's merged now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0