treecompare icon indicating copy to clipboard operation
treecompare copied to clipboard

Doesn't import under Python 3

Open OddBloke opened this issue 7 years ago • 2 comments

Python 3.5.3+ (default, Jun  7 2017, 23:23:48) 
[GCC 6.3.0 20170519] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import treecompare
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/daniel/.virtualenvs/mypy/lib/python3.5/site-packages/treecompare/__init__.py", line 24, in <module>
    from .differ import make_differ
  File "/home/daniel/.virtualenvs/mypy/lib/python3.5/site-packages/treecompare/differ.py", line 1, in <module>
    from . import implementations as impl
  File "/home/daniel/.virtualenvs/mypy/lib/python3.5/site-packages/treecompare/implementations.py", line 98, in <module>
    class DiffNumbers(DiffPrimitives):
  File "/home/daniel/.virtualenvs/mypy/lib/python3.5/site-packages/treecompare/implementations.py", line 99, in DiffNumbers
    diffs_types = (int, long, float)
NameError: name 'long' is not defined

OddBloke avatar Aug 22 '17 13:08 OddBloke

I'm curious about this too! (Interested in potentially diffing some trees for a recurring back-office chore.) Is this package being maintained? It looks to be <500 lines of Python. Adapting the build/test harness and debugging our way into Python 3 support would feel like a worthy package of open source effort - if there's a path to getting the changes into PyPI.

ramanshah avatar Jul 12 '21 18:07 ramanshah

I forked this repo today and have filed a task in my personal project management to break down a Python 3 port into actionable steps. Note it's a very low-urgency chore I need this for, so I can't guarantee it will happen soon or quickly.

Would love input from any other watchers on this - I think the goal of this package merits its maintenance as Python moves forward, and I in particular would rather use it than hand-roll some junky ad hoc tree diffing stuff. Judging by the above date stamps, this repo appears abandoned, but please correct me if I'm wrong. I'd far prefer to contribute through PRs than maintaining a fork but will do the latter if it's the best way forward.

ramanshah avatar Jan 03 '22 23:01 ramanshah