Skip to content
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

Make Config object pickle-able in Python 3 #154

Merged
merged 1 commit into from
Jun 11, 2020
Merged

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Apr 24, 2020

In Python 3, .items() returns a dict_items object, which can't easily be pickled. In Python 2, .items() returns a list of tuples, which can be pickled.

To maintain pickle-ability, convert the dict_items into a list.

rqt_reconfigure has a feature which saves current Dynamic Reconfigure configuration to a file, which is broken in Noetic without this change.

In Python 3, `.items()` returns a `dict_items` object, which can't easily
be pickled. In Python 2, `.items()` returns a list of tuples, which can
be pickled.

To maintain pickle-ability, convert the `dict_items` into a list.
@cottsay cottsay added the bug label Apr 24, 2020
@cottsay cottsay requested a review from mjcarroll April 24, 2020 21:55
@cottsay cottsay self-assigned this Apr 24, 2020
@cottsay cottsay removed the request for review from mjcarroll May 14, 2020 16:20
@cottsay cottsay added this to the ROS Noetic milestone May 14, 2020
Copy link

@hidmic hidmic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally that dict.items() return value type is not pickable.

@mjcarroll mjcarroll merged commit 44bf47d into noetic-devel Jun 11, 2020
@mjcarroll mjcarroll deleted the pickle_config branch June 11, 2020 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants