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

python3 guard for using rosmsg codec (take 2) #134

Merged
merged 2 commits into from
Sep 3, 2020

Conversation

dirk-thomas
Copy link
Member

Replaces #133 (since I didn't have permissions to push to the forked branch) and closes #132.

This patch makes the remaining code for the custom codec error handler conditional on the Python version.

@gwendolynbrook @mikepurvis FYI

@mikepurvis
Copy link
Member

If we're here anyway, should we check hasattr(genpy, 'RosMsgUnicodeErrors') before registering the handler, to cover the case where genpy is older on the target system than the machine that built the messages?

@dirk-thomas
Copy link
Member Author

should we check hasattr(genpy, 'RosMsgUnicodeErrors') before registering the handler

I am not sure I understand the proposed change. The registration (https://github.com/ros/genpy/pull/134/files#diff-f4626899ff80377c1eaf9d092e00785eR88) happens directly after defining the RosMsgUnicodeErrors class so I don't see how this needs to be conditional.

to cover the case where genpy is older on the target system than the machine that built the messages?

Wouldn't that require all using code (.decode('utf-8', 'rosmsg')) to only use the custom error handler conditionally?

@mikepurvis
Copy link
Member

Oh shoot, sorry yes— yeah, that would be much more invasive of a change. Disregard.

@dirk-thomas dirk-thomas merged commit 6aad61b into kinetic-devel Sep 3, 2020
@mikepurvis
Copy link
Member

Sorry for all the drama this ended up causing. :(

@dirk-thomas dirk-thomas deleted the bugfix/no-codec-for-python2 branch September 3, 2020 15:51
@dirk-thomas
Copy link
Member Author

@mikepurvis No worry, all changes have a risk (which could have been avoided if this repo would have a noetic-devel branch). So this isn't on you alone 😉

@gwendolynbrook
Copy link

@dirk-thomas @mikepurvis thanks for taking care of this (and apologies for the lag on my end; busy week + emails got sorted to spam 🤦 )

@dirk-thomas
Copy link
Member Author

@gwendolynbrook can you please still answer my previous question since that will determine if the merged pull request needs to be released soon or isn't urgent and might not be released at all.

@gwendolynbrook
Copy link

@dirk-thomas this questin? #132 (comment) (or am I missing another one?)

@dirk-thomas
Copy link
Member Author

@dirk-thomas this questin? #132 (comment)

Yes.

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

Successfully merging this pull request may close these issues.

regression on kinetic due to #127
3 participants