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

Support Python 3 #1

Open
bdoms opened this issue May 16, 2018 · 1 comment
Open

Support Python 3 #1

bdoms opened this issue May 16, 2018 · 1 comment

Comments

@bdoms
Copy link
Owner

bdoms commented May 16, 2018

No description provided.

@bdoms
Copy link
Owner Author

bdoms commented May 25, 2018

This is impossible as long as the Google SDK isn't Python 3 compatible. To get around the problems with them depending on the C versions of modules you can put something like this above the imports:

# python 3 fix for Google relying on C versions of modules
try:
    import cPickle
    import cStringIO
except ImportError:
    import _pickle
    from io import StringIO
    sys.modules['cPickle'] = _pickle
    sys.modules['cStringIO'] = StringIO

Which gets you somewhere, but eventually the code hits something like this and we can't start live-patching their code to get around all these cases:

raise ProtocolBufferDecodeError, '\n\t'.join(dbg)
                                   ^
SyntaxError: invalid syntax

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

No branches or pull requests

1 participant