[jira] [Commented] (TINKERPOP-1895) gremlin-python lambdas do not work with HaltedTraverserStrategy(DetachedFactory)

2018-03-09 Thread stephen mallette (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16392938#comment-16392938
 ] 

stephen mallette commented on TINKERPOP-1895:
-

The fix to this one is on TINKERPOP-1896

> gremlin-python lambdas do not work with 
> HaltedTraverserStrategy(DetachedFactory)
> 
>
> Key: TINKERPOP-1895
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1895
> Project: TinkerPop
>  Issue Type: Bug
>  Components: python
>Affects Versions: 3.3.1
>Reporter: Branden Moore
>Priority: Major
> Fix For: 3.2.8, 3.3.2
>
>
> When using the HaltedTraverserStrategy(o.a.t.g.s.u.d.DetachedFactory) in 
> gremlin-python, lambdas cannot be processed, returning a Python NameError.
> Using the examples from the documentation, against 
> gremlin-server-modern-py.yaml
>  
>  g.V().out().map(lambda: "x: len(x.get().value('name'))").sum().toList()
> [24L]
> g.withStrategies(HaltedTraverserStrategy("org.apache.tinkerpop.gremlin.structure.util.detached.DetachedFactory")).V().out().map(lambda:
>  "x: len(x.get().value('name'))").sum().toList()
> GremlinServerError: 599: NameError: name 'TraversalStrategy' is not defined 
> in 

[jira] [Commented] (TINKERPOP-1895) gremlin-python lambdas do not work with HaltedTraverserStrategy(DetachedFactory)

2018-02-20 Thread stephen mallette (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16370575#comment-16370575
 ] 

stephen mallette commented on TINKERPOP-1895:
-

I don't think you need to use {{HaltedTraverserStrategy}} this way if you are 
on 3.3.1. Note that it's already configured on the server for you:

{code}
gremlin> g = 
EmptyGraph.instance().traversal().withRemote('conf/remote-graph.properties')
==>graphtraversalsource[emptygraph[empty], standard]
gremlin> g.V()
gremlin> v = g.addV('person').property('a',123).next()
==>v[0]
gremlin> v.label
==>person
gremlin> v.properties()
{code}

That doesn't mean that how this is currently working is ok - we'll need to look 
at what's happening when you try to add the strategy.

> gremlin-python lambdas do not work with 
> HaltedTraverserStrategy(DetachedFactory)
> 
>
> Key: TINKERPOP-1895
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1895
> Project: TinkerPop
>  Issue Type: Bug
>  Components: python
>Affects Versions: 3.3.1
>Reporter: Branden Moore
>Priority: Major
>
> When using the HaltedTraverserStrategy(o.a.t.g.s.u.d.DetachedFactory) in 
> gremlin-python, lambdas cannot be processed, returning a Python NameError.
> Using the examples from the documentation, against 
> gremlin-server-modern-py.yaml
>  
>  g.V().out().map(lambda: "x: len(x.get().value('name'))").sum().toList()
> [24L]
> g.withStrategies(HaltedTraverserStrategy("org.apache.tinkerpop.gremlin.structure.util.detached.DetachedFactory")).V().out().map(lambda:
>  "x: len(x.get().value('name'))").sum().toList()
> GremlinServerError: 599: NameError: name 'TraversalStrategy' is not defined 
> in