Hi Jeff, Python 3 support has been almost finished for quite a long time, but not yet merged into the master. There are still a few remaining issues to handle (string and binary). I can only say it's "soon" but we're definitely working on it in the hope that we can include this in the next release.
On Mon, Nov 2, 2015 at 5:02 PM Jens Geyer <[email protected]> wrote: > Hi Jeff, > > not sure about the state of Py3 but could you just look if there is > already a JIRA ticket for your specific problem? Otherwise please file one. > > Thanks! > ________________________________ > Von: Jeff Nelson > Gesendet: 01.11.2015 23:24 > An: [email protected] > Betreff: Support for Python3 > > Hi, > > I recently upgraded a project to use Python3 and am now getting errors from > Thrift. The error is TypeError: string argument expected, got 'bytes' and > the stack trace is > > ... > self._oprot.writeMessageBegin('login', TMessageType.CALL, self._seqid) > File > > "/Users/jnelson/.pyenv/versions/3.3.6/lib/python3.3/site-packages/thrift/protocol/TBinaryProtocol.py", > line 46, in writeMessageBegin > self.writeI32(TBinaryProtocol.VERSION_1 | type) > File > > "/Users/jnelson/.pyenv/versions/3.3.6/lib/python3.3/site-packages/thrift/protocol/TBinaryProtocol.py", > line 111, in writeI32 > self.trans.write(buff) > File > > "/Users/jnelson/.pyenv/versions/3.3.6/lib/python3.3/site-packages/thrift/transport/TTransport.py", > line 168, in write > raise e > File > > "/Users/jnelson/.pyenv/versions/3.3.6/lib/python3.3/site-packages/thrift/transport/TTransport.py", > line 164, in write > self.__wbuf.write(buf) > > Trying to figure out if Python3 is supported by Thrift is giving me > conflicting answers. The Jira > <https://issues.apache.org/jira/browse/THRIFT-1857> for the issue is still > open, but comments on StackOverflow > < > http://stackoverflow.com/questions/32229690/apache-thrift-python-3-support > > > suggest > that support arrived with the 0.9.3 release (but I'm still getting the > error after upgrading the Python Thrift library to 0.9.3). > > In any case. I'm not a Python export, but it seems to me that this issue is > happening because __wbuf is an instance of StringIO, as opposed to BytesIO > < > http://stackoverflow.com/questions/6479100/python-stringio-replacement-that-works-with-bytes-instead-of-strings > > > . > > So, is Python3 supported at this point, and if not, what is the plan for > adding it? > > Thanks, > Jeff >
