nbdiff icon indicating copy to clipboard operation
nbdiff copied to clipboard

Python3 support?

Open rgaiacs opened this issue 11 years ago • 3 comments

Thanks for supply this great tool for the community.

When I try to install it I got some warnings related with the use of print statement instead of print function since I'm using Python3 and didn't notice any information about it in README. There is any plan to supply a Python3 compatible version?

rgaiacs avatar Mar 30 '14 20:03 rgaiacs

Thanks! It shouldn't be too hard to support python3. I'll see if I can find some time to port it, but pull requests are welcome.

tarmstrong avatar Apr 14 '14 19:04 tarmstrong

When using 2to3 there are some changes that I don't know the best way to keep it compatible with Python2:

  • replace urllib2 with urllib.request at nbdiff/server/command/MergeURLCommand.py and nbdiff/server/command/DiffURLCommand.py,
  • replace __nonzero__ with __bool__ at nbdiff/server/database/__init__.py,
  • keys() behavior at nbdiff/adapter/git_adapter.py.

rgaiacs avatar Apr 15 '14 00:04 rgaiacs

Just use if PY3 constructs. For nonzero, just keep both methods, with one equals the other.

asmeurer avatar Apr 15 '14 02:04 asmeurer