Repository navigation
Add support for Python 3.x #1
Description
Activity
Main things this involves:
print -> print(), handle__floordiv__/__truediv__/__div__correctly.👍 to this issue
👍
👍
👍
We're working on it.
Python 3 is a must have. 👍
How do we contribute towards python3 support? Are there any specific tickets open? Is there a python3 development branch?
@mgcdanny seems they require contributors to sign an agreement first.
https://github.com/tensorflow/tensorflow/blob/master/CONTRIBUTING.md👍
I'm running futurize on the code at the moment; once that's done it'll be easier to parallelize the remaining work. So far
futurize --stage1is checked in and I'm working throughfuturize --stage2now (checking each of our divisions very carefully :)).Unfortunately our contribution process needs a bit of improvement (we're working on streamlining it), but I'll see if there are natural chunks of work to break off and ask for help in fixing once the initial futurize push is done. Before that it's tricky to parallelize.
The only non-obvious questions (so far) are what to do with unicode and where. Cc'ing @mrry since he was taking a look at that. Most of the "names" for things, such as names for ops and names for tensors in a graph, are already restricted to be roughly alphanumeric, so hopefully we should be able to leave them as C++
stringwhile still accepting unicode input from Python.Also, question for people that have done such conversions before / recently: is
sixstill the recommended way to make code transparently support both? In particular, we need stuff likexrangeanditeritemsas symbols that exist in both 2.7 and 3.x.@girving I would follow the guide written by python3 core dev Brett Cannon: https://docs.python.org/3.5/howto/pyporting.html. He's been heavily involved with the push to move existing libs to python3.
190 remaining items
Load more actions- added 3 commits that reference this issue
on May 22, 2026 - added 12 commits that reference this issue
on Aug 3, 2026
Currently we only support Python 2.7, but we should support Python 3.