Fix str conversion in encode_ros_handshake_header#789
Fix str conversion in encode_ros_handshake_header#789benureau wants to merge 1 commit intoros:kinetic-develfrom benureau:fixstrconv
Conversation
The previous code was not properly filtering unicode/str out of the header. Added the corresponding unit test.
|
Was PR #786, before I messed up with |
|
Darn, that was careless of me |
|
Thank you for the patch. I have slightly updated it in #792 (while keep the commit in your name) to make it a bit simpler and easier to read. |
|
It would make more sense here to define the API (at least for py3) as taking either |
|
I would rather not spend time on revising the specified API. The current code should handle both input well. |
|
I'd argue that the API is currently underspecified, especially for python 3. Python 3 makes a big point about enforcing the deliberate use of either Having said that, I get the impression that python3 support is not a big item on the roadmap, and so by association nor is being picky about the |
|
I think it is "good" API even in Python 3 to allow passing in either Yes, there is currently no roadmap about Python 3 in ROS 1. We have made a significant push on that topic a year and a half ago. But then it was decided to not spend further resources on it. But any pull request improving Python 3 support (especially since some platforms use it by default) are highly appreciated. |
|
Having trudged through the installation of MORSE/ROS with python 3 (and on OS X, to make matters worse), I can definitely say that python 3 support is not a big item on the roadmap. But with packages such as the MORSE simulator that only support python 3, it should be. In the meantime, I'll keep posting patches for bugs I encounter and understand. Thanks for all the attention and reactivity you brought to this PR. |
|
ROS 2 is jumping ship to python 3 only, right? |
|
Yes, ROS 2 is Python 3 only. |
I don't agree. Python 3 makes a big distinction between these two types
Are headers text or data? Should I be able to put a binary string in the header?
|
The previous code was not properly filtering unicode/str
out of the header. Added the corresponding unit test.