I've been trying to figure out why the GLV test suite won't pass for
gremlin-python in GraphSON 3.0 on this issue:

https://issues.apache.org/jira/browse/TINKERPOP-1844

The answer turns out to be related to the g:Set. Numbers of mixed types
returned from a Set in java aren't recognized as distinct in a python Set,
thus a Set in java of:

[1, 1.0, 2, 2.0]

would be seen in python as:

[1,2]

The only answer (it seems) is to convert g:Set in python to a List. Then
users will have to manually convert their List to a Set if they deem in
necessary. I think that this approach makes the most sense as python users
likely wouldn't expect their sets to behave like java sets with the weird
numeric equality stuff.

Obviously, making this change would be a breaking change for python users.
I think it's sensible to make this change however on tp32/master as imo
this is a bug that prevents results from being the same in python as they
are in Java. Note that other than a single unit test assertion that was
ensuring that g:Set was deserializing to Set, all tests passed including
all the GLV tests.

I've prepared a PR here:

https://github.com/apache/tinkerpop/pull/769

I'll let it sit at least 72 hours in review before merging even if the
votes come in early, in case anyone has any objections.

Reply via email to