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-support using protobuf-3.0.0a2 #44

Merged
merged 2 commits into from
May 29, 2015
Merged

Python3-support using protobuf-3.0.0a2 #44

merged 2 commits into from
May 29, 2015

Conversation

hansmbakker
Copy link

Update protobuf to version 3
Generate new protobuf-scripts from https://chromium.googlesource.com/chromium/src.git/+/master/extensions/common/api/cast_channel
Update socket-reading code in socket_client to work with python3 (byte-arrays are not strings in python3)

Generate new protobuf-scripts from https://chromium.googlesource.com/chromium/src.git/+/master/extensions/common/api/cast_channel
Update socket-reading code in socket_client to work with python3 (byte-arrays are not strings in python3)
@hansmbakker
Copy link
Author

With this code, I'm able to run example.py again on python3. I only got one warning message:

Received unknown namespace: Message urn:x-cast:com.google.cast.tp.connection from web-1 to sender-0: {'type': 'CLOSE'}

However, functionally it works well.

I included the .proto-files I used to generate the protobuf-scripts. I imported them from the master branch at https://chromium.googlesource.com/chromium/src.git/+/master/extensions/common/api/cast_channel/. Maybe there is a better way to include them and keep them up-to-date?

@hansmbakker
Copy link
Author

I excluded two more generated protobuf scripts from pylint. The .proto files for them were in https://chromium.googlesource.com/chromium/src.git/+/master/extensions/common/api/cast_channel/, not sure if they are needed.

@balloob
Copy link
Collaborator

balloob commented May 28, 2015

Awesome!

I'll hope to have time to look into it tonight. If this works I'll make sure to release a new version and get it working in HA again.

balloob added a commit that referenced this pull request May 29, 2015
Python3-support using protobuf-3.0.0a2
@balloob balloob merged commit e04ec72 into home-assistant-libs:master May 29, 2015
@balloob
Copy link
Collaborator

balloob commented May 29, 2015

Published new version to PyPi 😄

@hansmbakker
Copy link
Author

Great to hear :D thanks for merging

@hansmbakker
Copy link
Author

I'm busy making it work at least partly again in Home Assistant. I'll make a commit there after ~30 min.

I could use some help with connecting the broken parts again. For example lots of media status properties like album, image etc disappeared and also the play_next_track() method disappeared.

@hansmbakker hansmbakker deleted the python3-support branch May 30, 2015 09:08
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