robotframework/PythonRemoteServer

Python3 Support

w60001 opened this issue · 4 comments

This server code works great with Python2, but is not compatible with Python3. I attempted to port the code to Python3 (both manually and via 2to3), but am running into various errors:

TypeError: a bytes-like object is required, not 'str'
<class 'TypeError'>:'TypeError' object is not iterable

For someone more familiar with Python 2->3 than I am, I'm assuming this should be fairly easy. This remote server is very important for using as a reference.

Well, I got to a solution that I think is 90% correct for 3.5 at least. I attached it here as a starting point. I don't feel especially confident that binary data would work, as my tests don't use that...

robotremoteserver3.py.txt

Python 3 support is important. It would be great if we could still support Python/Jython 2.5 too, but if that is too much work supporting only 2.6 and newer is OK.

Could you please create a pull request with your changes? It makes reviewing them a lot easier. Notice also that there are tests in the test directory that should pass with your changes.

This is a dupe of #17.

More work would be required to get my code to work for 2.6 and newer, so probably not too useful on its own...

Thanks.