GitHub user eevee opened a pull request:
https://github.com/apache/thrift/pull/213
Python 3 support, redux
As mentioned on [the Jira
ticket](https://issues.apache.org/jira/browse/THRIFT-1857?focusedCommentId=14104848&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14104848),
there are still some minor problems with `fastbinary.c`, which uses a private
API that no longer exists in Python 3. I think it's worth just removing
outright.
But the test suite passes completely on Python 3, now.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/eevee/thrift python3
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/213.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #213
----
commit 3b4b03ea24d90787736b4da8ce70ee31455cbf6e
Author: Thomas Bartelmess <[email protected]>
Date: 2014-04-30T20:21:05Z
Python 3 support
Added six to install_requires in setup.py
commit 03d7a6dc2d6d410d5b9b89abd0a464b751d2162b
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-19T23:07:36Z
Fix useless warnings about a broken C extension on 3.x, PyPy, etc.
Also remove use_2to3, since this is supposed to be single-codebase now.
commit 3d912d748041f9a446cd0bf7580462d93316f60e
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-19T23:12:16Z
Fix a few minor nitpicks with the Python 3 fixes.
commit ee916e9486364fa4130ff109b58ad43fef636757
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-19T23:28:07Z
JSONProtocol's constants need to be bytestrings.
commit 2b820077a77bd539c979cbae0998d4c562e80c35
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-19T23:28:55Z
Use print_function in the Python tests.
commit 242ed1e7aea7cf05512495aabcaf1452bbc27c6a
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-19T23:29:09Z
Unbreak the Python tests when the C extension doesn't exist.
If there's no C part, everything gets built into `build/lib/`, but the
shell globs were looking for a dot.
commit 9c5161bc17d4ba7e89e8eb08bed2a481dc58f878
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-19T23:30:06Z
Trailing whitespace my editor fixed for me.
commit 863efcb78e43d1adbe17fd024b2546d054055497
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-20T02:53:07Z
Probably don't need this 2.4 compat any more.
commit 6981c4b3e0b8ed5480fc4dd794659beefe34a90d
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-20T02:53:20Z
Stop generating code that contains xrange and iteritems.
commit 6b3d2749ec80c6fb1b20d4f6a810d84c7edf0dda
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-20T02:53:50Z
Make JSON and compact protocols use bytes everywhere.
commit 5fec5813830eb6437ecb00effabfd6647dec6d9c
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-20T02:54:31Z
Python 3 support in test/py/.
commit 2c06f4acea8993f3766e6120755d1ac23d00eef8
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-20T02:54:44Z
Miscellaneous module moves and text/bytes stuff that was missed.
commit 516406ba0f5698783552dbb012118e8964033698
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-20T03:14:21Z
Fix more sys.path.insert glob shenanigans.
commit 4c5ae2e5004de16f3389414b129a1ca88abda925
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-20T03:43:51Z
Fix a bad relativized import.
commit eb0132e1658428440c7b36624afc07d62616dd82
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-20T03:44:07Z
Fix another old-style exception syntax in the Python generator.
commit 43ea49778757ad0799769fc4cef242fea00b4914
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-20T03:46:13Z
Run 2to3 on the Python tutorial code.
commit c0fd1a85b7ee2016c0b237a07e45aac23fcb2386
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-20T04:08:50Z
Don't compile to itervalues, either.
commit 3b767742c1a5372a78943885f11a2f23e985a46a
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-08-20T04:09:06Z
Fix passing a float to struct.pack() -- tolerated in 2, not 3.
commit 19d9f4ebcf90679a29235ae4c4b8ba45d01405ef
Author: Eevee (Alex Munroe) <[email protected]>
Date: 2014-09-11T22:42:50Z
And one more round of fixing JSON decoding.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---