[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-06-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16505545#comment-16505545
 ] 

ASF GitHub Bot commented on THRIFT-4548:


jeking3 closed pull request #1535: THRIFT-4548: Supporting 
TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python
URL: https://github.com/apache/thrift/pull/1535
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/lib/py/src/TMultiplexedProcessor.py 
b/lib/py/src/TMultiplexedProcessor.py
index 605aa1f252..28a3aa92e8 100644
--- a/lib/py/src/TMultiplexedProcessor.py
+++ b/lib/py/src/TMultiplexedProcessor.py
@@ -18,7 +18,7 @@
 #
 
 from thrift.Thrift import TProcessor, TMessageType, TException
-from thrift.protocol import TProtocolDecorator, TMultiplexedProtocol
+from thrift.protocol import TMultiplexedProtocol
 
 
 class TMultiplexedProcessor(TProcessor):
@@ -43,13 +43,5 @@ def process(self, iprot, oprot):
 raise TException("Service name not found: " + serviceName + ". Did 
you forget to call registerProcessor()?")
 
 standardMessage = (call, type, seqid)
-return self.services[serviceName].process(StoredMessageProtocol(iprot, 
standardMessage), oprot)
-
-
-class StoredMessageProtocol(TProtocolDecorator.TProtocolDecorator):
-def __init__(self, protocol, messageBegin):
-TProtocolDecorator.TProtocolDecorator.__init__(self, protocol)
-self.messageBegin = messageBegin
-
-def readMessageBegin(self):
-return self.messageBegin
+iprot.readMessageBegin = lambda: standardMessage
+return self.services[serviceName].process(iprot, oprot)
diff --git a/lib/py/src/protocol/TMultiplexedBinaryProtocolAccelerated.py 
b/lib/py/src/protocol/TMultiplexedBinaryProtocolAccelerated.py
new file mode 100644
index 00..a0864f88dc
--- /dev/null
+++ b/lib/py/src/protocol/TMultiplexedBinaryProtocolAccelerated.py
@@ -0,0 +1,33 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+from thrift.Thrift import TMessageType
+from thrift.protocol.TBinaryProtocol import TBinaryProtocolAccelerated
+
+class TMultiplexedBinaryProtocolAccelerated(TBinaryProtocolAccelerated):
+def __init__(self, serviceName, *args, **kwargs):
+super(TMultiplexedBinaryProtocolAccelerated, self).__init__(*args, 
**kwargs)
+self.serviceName = serviceName
+self.separator = ":"
+
+def writeMessageBegin(self, name, type, seqid):
+if (type == TMessageType.CALL or type == TMessageType.ONEWAY):
+super(TMultiplexedBinaryProtocolAccelerated, 
self).writeMessageBegin(self.serviceName + self.separator + name, type, seqid)
+else:
+super(TMultiplexedBinaryProtocolAccelerated, 
self).writeMessageBegin(name, type, seqid)


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-06-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16505544#comment-16505544
 ] 

ASF GitHub Bot commented on THRIFT-4548:


jeking3 closed pull request #1547: THRIFT-4548: python binary accelerated 
protocol with multiplexing via decoration
URL: https://github.com/apache/thrift/pull/1547
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/lib/py/src/TMultiplexedProcessor.py 
b/lib/py/src/TMultiplexedProcessor.py
index 7d603472d0..3ac5af05c9 100644
--- a/lib/py/src/TMultiplexedProcessor.py
+++ b/lib/py/src/TMultiplexedProcessor.py
@@ -48,7 +48,6 @@ def process(self, iprot, oprot):
 
 class StoredMessageProtocol(TProtocolDecorator.TProtocolDecorator):
 def __init__(self, protocol, messageBegin):
-TProtocolDecorator.TProtocolDecorator.__init__(self, protocol)
 self.messageBegin = messageBegin
 
 def readMessageBegin(self):
diff --git a/lib/py/src/protocol/TMultiplexedProtocol.py 
b/lib/py/src/protocol/TMultiplexedProtocol.py
index 309f896d0e..0f8390fdbf 100644
--- a/lib/py/src/protocol/TMultiplexedProtocol.py
+++ b/lib/py/src/protocol/TMultiplexedProtocol.py
@@ -25,16 +25,15 @@
 
 class TMultiplexedProtocol(TProtocolDecorator.TProtocolDecorator):
 def __init__(self, protocol, serviceName):
-TProtocolDecorator.TProtocolDecorator.__init__(self, protocol)
 self.serviceName = serviceName
 
 def writeMessageBegin(self, name, type, seqid):
 if (type == TMessageType.CALL or
 type == TMessageType.ONEWAY):
-self.protocol.writeMessageBegin(
+super(TMultiplexedProtocol, self).writeMessageBegin(
 self.serviceName + SEPARATOR + name,
 type,
 seqid
 )
 else:
-self.protocol.writeMessageBegin(name, type, seqid)
+super(TMultiplexedProtocol, self).writeMessageBegin(name, type, 
seqid)
diff --git a/lib/py/src/protocol/TProtocolDecorator.py 
b/lib/py/src/protocol/TProtocolDecorator.py
index 8b270a466f..f5546c736e 100644
--- a/lib/py/src/protocol/TProtocolDecorator.py
+++ b/lib/py/src/protocol/TProtocolDecorator.py
@@ -17,34 +17,10 @@
 # under the License.
 #
 
-import types
 
-from thrift.protocol.TProtocol import TProtocolBase
-
-
-class TProtocolDecorator():
-def __init__(self, protocol):
-TProtocolBase(protocol)
-self.protocol = protocol
-
-def __getattr__(self, name):
-if hasattr(self.protocol, name):
-member = getattr(self.protocol, name)
-if type(member) in [
-types.MethodType,
-types.FunctionType,
-types.LambdaType,
-types.BuiltinFunctionType,
-types.BuiltinMethodType,
-]:
-return lambda *args, **kwargs: self._wrap(member, args, kwargs)
-else:
-return member
-raise AttributeError(name)
-
-def _wrap(self, func, args, kwargs):
-if isinstance(func, types.MethodType):
-result = func(*args, **kwargs)
-else:
-result = func(self.protocol, *args, **kwargs)
-return result
+class TProtocolDecorator(object):
+def __new__(cls, protocol, *args, **kwargs):
+decorated_cls = type(''.join(['Decorated', 
protocol.__class__.__name__]),
+ (cls, protocol.__class__),
+ protocol.__dict__)
+return object.__new__(decorated_cls)
diff --git a/test/known_failures_Linux.json b/test/known_failures_Linux.json
index 3212f7e8f0..cd83bd564e 100644
--- a/test/known_failures_Linux.json
+++ b/test/known_failures_Linux.json
@@ -1,12 +1,4 @@
 [
-  "c_glib-py3_multi-multia_buffered-ip",
-  "c_glib-py3_multi-multia_framed-ip",
-  "c_glib-py3_multic-multiac_buffered-ip",
-  "c_glib-py3_multic-multiac_framed-ip",
-  "c_glib-py_multi-multia_buffered-ip",
-  "c_glib-py_multi-multia_framed-ip",
-  "c_glib-py_multic-multiac_buffered-ip",
-  "c_glib-py_multic-multiac_framed-ip",
   "c_glib-rs_multi_buffered-ip",
   "c_glib-rs_multi_framed-ip",
   "c_glib-rs_multic_buffered-ip",
@@ -19,10 +11,6 @@
   "cl-c_glib_multi_framed-ip",
   "cl-go_binary_buffered-ip",
   "cl-go_binary_framed-ip",
-  "cl-py3_multi-multia_buffered-ip",
-  "cl-py3_multi-multia_framed-ip",
-  "cl-py_multi-multia_buffered-ip",
-  "cl-py_multi-multia_framed-ip",
   "cl-rb_binary-accel_buffered-ip",
   "cl-rb_binary-accel_framed-ip",
   "cl-rb_binary_buffered-ip",
@@ -101,10 +89,6 @@
   "cpp-py3_multi-accel_http-ip-ssl",
   "cpp-py3_multi-binary_http-ip",
   "cpp-py3_multi-binary_http-ip-ssl",
-  "cpp-py3_multi-multia_buffered-ip",
-  

[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-06-04 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16500469#comment-16500469
 ] 

ASF GitHub Bot commented on THRIFT-4548:


nijm commented on issue #1547: THRIFT-4548: python binary accelerated protocol 
with multiplexing via decoration
URL: https://github.com/apache/thrift/pull/1547#issuecomment-394416947
 
 
   I have disabled the http based cpp server tests - the remaining cross 
language tests are all passing.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-05-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16488576#comment-16488576
 ] 

ASF GitHub Bot commented on THRIFT-4548:


cosven commented on issue #1547: THRIFT-4548: python binary accelerated 
protocol with multiplexing via decoration
URL: https://github.com/apache/thrift/pull/1547#issuecomment-391602105
 
 
   > so the decorated protocol object passed into the binary accelerated C 
extension was not really a TProtocolBase object, which caused errors.
   
   As far as I know, the C extension does not care what protocol type Python 
passed into. It just uses the BinaryProtocol or CompatProtocol define in 
bianry/compat.h to do encoding and decoding.
   
   In my opinion, the real problem is that `TXxxProtocol()._fast_encode` is 
BuiltInFunction instead of a Method(at the moment). And the 
`TProtocolDecorator._wrap` does not handle this case.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-05-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16488575#comment-16488575
 ] 

ASF GitHub Bot commented on THRIFT-4548:


cosven commented on issue #1547: THRIFT-4548: python binary accelerated 
protocol with multiplexing via decoration
URL: https://github.com/apache/thrift/pull/1547#issuecomment-391602105
 
 
   > so the decorated protocol object passed into the binary accelerated C 
extension was not really a TProtocolBase object, which caused errors.
   
   As far as I know, the C extension does not care what protocol type Python 
passed into. It just uses the BinaryProtocol or CompatProtocol define in 
bianry/compat.h to do encoding and decoding.
   
   In my opinion, the real problem is that `TXxxProtocol()._fast_encode` is 
BuiltInFunction instead of a Method. And the `TProtocolDecorator._wrap` does 
not handle this case.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-05-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16488509#comment-16488509
 ] 

ASF GitHub Bot commented on THRIFT-4548:


cosven commented on issue #1547: THRIFT-4548: python binary accelerated 
protocol with multiplexing via decoration
URL: https://github.com/apache/thrift/pull/1547#issuecomment-391602105
 
 
   > so the decorated protocol object passed into the binary accelerated C 
extension was not really a TProtocolBase object, which caused errors.
   
   As far as I know, the C extension does not care what protocol type Python 
passed into. It just use the BinaryProtocol or CompatProtocol define in 
bianry/compat.h to do encoding and decoding.
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-05-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16488510#comment-16488510
 ] 

ASF GitHub Bot commented on THRIFT-4548:


cosven commented on issue #1547: THRIFT-4548: python binary accelerated 
protocol with multiplexing via decoration
URL: https://github.com/apache/thrift/pull/1547#issuecomment-391602105
 
 
   > so the decorated protocol object passed into the binary accelerated C 
extension was not really a TProtocolBase object, which caused errors.
   
   As far as I know, the C extension does not care what protocol type Python 
passed into. It just uses the BinaryProtocol or CompatProtocol define in 
bianry/compat.h to do encoding and decoding.
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-05-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16488502#comment-16488502
 ] 

ASF GitHub Bot commented on THRIFT-4548:


cosven commented on issue #1547: THRIFT-4548: python binary accelerated 
protocol with multiplexing via decoration
URL: https://github.com/apache/thrift/pull/1547#issuecomment-391602105
 
 
   > so the decorated protocol object passed into the binary accelerated C 
extension was not really a TProtocolBase object, which caused errors.
   
   As far as I know, the C extension does not care what protocol type Python 
passed into. It just ignore the protocol arguement and use the BinaryProtocol 
or CompatProtocol define in bianry/compat.h to do encoding and decoding.
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-05-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474222#comment-16474222
 ] 

ASF GitHub Bot commented on THRIFT-4548:


jeking3 commented on issue #1535: THRIFT-4548: Supporting 
TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python
URL: https://github.com/apache/thrift/pull/1535#issuecomment-388816362
 
 
   I think this is obsoleted by #1547 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-05-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474198#comment-16474198
 ] 

ASF GitHub Bot commented on THRIFT-4548:


jeking3 commented on issue #1535: THRIFT-4548: Supporting 
TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python
URL: https://github.com/apache/thrift/pull/1535#issuecomment-388814670
 
 
   Hi, haven't heard back - any interest in continuing this work?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-05-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16460704#comment-16460704
 ] 

ASF GitHub Bot commented on THRIFT-4548:


nijm commented on issue #1547: THRIFT-4548: python binary accelerated protocol 
with multiplexing via decoration
URL: https://github.com/apache/thrift/pull/1547#issuecomment-385902358
 
 
   That's done. The travis build still has the same SSL timeouts, but the 
AppVeyor build succeeded (even though it looks like there was a problem with 
javadoc).


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-04-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16442616#comment-16442616
 ] 

ASF GitHub Bot commented on THRIFT-4548:


nijm commented on issue #1547: THRIFT-4548: python binary accelerated protocol 
with multiplexing via decoration
URL: https://github.com/apache/thrift/pull/1547#issuecomment-382412166
 
 
   I've cleared most of the cross-test failures. It looks like the remaining 
failures are SSL-related timeouts (if I've interpreted the logs correctly). I 
don't think they're related to this change, but please let me know if they are.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-04-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16441809#comment-16441809
 ] 

ASF GitHub Bot commented on THRIFT-4548:


jeking3 commented on a change in pull request #1547: THRIFT-4548: python binary 
accelerated protocol with multiplexing via decoration
URL: https://github.com/apache/thrift/pull/1547#discussion_r182295851
 
 

 ##
 File path: lib/py/src/protocol/TMultiplexedProtocol.py
 ##
 @@ -25,16 +25,15 @@
 
 class TMultiplexedProtocol(TProtocolDecorator.TProtocolDecorator):
 def __init__(self, protocol, serviceName):
-TProtocolDecorator.TProtocolDecorator.__init__(self, protocol)
 self.serviceName = serviceName
 
 def writeMessageBegin(self, name, type, seqid):
 if (type == TMessageType.CALL or
 type == TMessageType.ONEWAY):
-self.protocol.writeMessageBegin(
+super().writeMessageBegin(
 
 Review comment:
   super() takes at least 1 argument


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-04-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16441810#comment-16441810
 ] 

ASF GitHub Bot commented on THRIFT-4548:


jeking3 commented on a change in pull request #1547: THRIFT-4548: python binary 
accelerated protocol with multiplexing via decoration
URL: https://github.com/apache/thrift/pull/1547#discussion_r182295856
 
 

 ##
 File path: lib/py/src/protocol/TMultiplexedProtocol.py
 ##
 @@ -25,16 +25,15 @@
 
 class TMultiplexedProtocol(TProtocolDecorator.TProtocolDecorator):
 def __init__(self, protocol, serviceName):
-TProtocolDecorator.TProtocolDecorator.__init__(self, protocol)
 self.serviceName = serviceName
 
 def writeMessageBegin(self, name, type, seqid):
 if (type == TMessageType.CALL or
 type == TMessageType.ONEWAY):
-self.protocol.writeMessageBegin(
+super().writeMessageBegin(
 self.serviceName + SEPARATOR + name,
 type,
 seqid
 )
 else:
-self.protocol.writeMessageBegin(name, type, seqid)
+super().writeMessageBegin(name, type, seqid)
 
 Review comment:
   super() takes at least 1 argument


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-04-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16441808#comment-16441808
 ] 

ASF GitHub Bot commented on THRIFT-4548:


jeking3 commented on issue #1547: THRIFT-4548: python binary accelerated 
protocol with multiplexing via decoration
URL: https://github.com/apache/thrift/pull/1547#issuecomment-382233558
 
 
   Very nice - I knew something was wrong when I had to disable that many tests 
as I added multiplexed support to TestClient, so I'm really glad to see you 
figured it out and removed the test exclusions!
   
   Test failures:  Appveyor:  Looks like oracle moved a download link and the 
chocolatey package hasn't been updated yet.  Not relevant to this change.
   
   sca build failure:
   ```
   # Python code style
   flake8 --ignore=E501 --exclude=lib/py/build lib/py
   lib/py/src/protocol/TProtocolDecorator.py:23:41: E226 missing whitespace 
around arithmetic operator
   lib/py/src/protocol/TProtocolDecorator.py:27:1: W391 blank line at end of 
file
   ```
   
   Recommend you run the flake8 commands in build/docker/scripts/sca.sh after 
making python code changes to avoid that in the future.  We might even want to 
teach our regular make to do this if it's fast.
   
   ubsan failure is an intermittent lisp compiler issue where it cannot find a 
temporary file it just wrote - not relevant here.
   
   Cross test failure is real and related to the changes:
   ```
   *** client message ***
   Tue Apr 17 17:11:46 2018
   Executing: /thrift/src/test/py/TestClient.py --verbose --host=localhost 
--genpydir=gen-py --protocol=multi --transport=framed --port=46135
   Directory: /thrift/src/test/py
   config:delay: 5
   config:timeout: 10
   
===
   EE
   ==
   ERROR: testBinary (__main__.MultiplexedBinaryTest)
   --
   Traceback (most recent call last):
 File "/thrift/src/test/py/TestClient.py", line 148, in testBinary
   self.assertEqual(bytearray(self.client.testBinary(bytes(val))), val)
 File "/thrift/src/test/py/gen-py/ThriftTest/ThriftTest.py", line 574, in 
testBinary
   self.send_testBinary(thing)
 File "/thrift/src/test/py/gen-py/ThriftTest/ThriftTest.py", line 578, in 
send_testBinary
   self._oprot.writeMessageBegin('testBinary', TMessageType.CALL, 
self._seqid)
 File 
"/thrift/src/lib/py/build/lib.linux-x86_64-2.7/thrift/protocol/TMultiplexedProtocol.py",
 line 33, in writeMessageBegin
   super().writeMessageBegin(
   TypeError: super() takes at least 1 argument (0 given)
   ```
   
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-04-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16441034#comment-16441034
 ] 

ASF GitHub Bot commented on THRIFT-4548:


nijm opened a new pull request #1547: THRIFT-4548: python binary accelerated 
protocol with multiplexing via decoration
URL: https://github.com/apache/thrift/pull/1547
 
 
   THRIFT-4548: multiplexed (decorated) protocols inherit from TProtocolBase
   Client: py
   
   TMultiplexedProtocol objects did not inherit from TProtocolBase, so the 
decorated protocol object passed into the binary accelerated C extension was 
not really a TProtocolBase object, which caused errors. This implementation 
decorates the protocol object by dynamically creating a new class that extends 
both the class of the protocol being decorated and TMultiplexedProtocol.
   
   I tested the changes locally. I had trouble running the full suite of cross 
tests, but running the py,py3 cross tests worked, although I'm not sure these 
are testing multiplexed protocols.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-04-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16432365#comment-16432365
 ] 

ASF GitHub Bot commented on THRIFT-4548:


jeking3 commented on issue #1535: THRIFT-4548: Supporting 
TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python
URL: https://github.com/apache/thrift/pull/1535#issuecomment-380122560
 
 
   You can see the changes I made (running them through CI) here:
   
   https://github.com/jeking3/thrift/pull/14
   
   Specifically the tests.json and TestClient.py file changes.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-04-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16432315#comment-16432315
 ] 

ASF GitHub Bot commented on THRIFT-4548:


jeking3 commented on issue #1535: THRIFT-4548: Supporting 
TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python
URL: https://github.com/apache/thrift/pull/1535#issuecomment-380110932
 
 
   I added multi support to the python cross test client and I have multi, 
multic, multij working  in the python TestClient against various servers. 
   
   It looks like multiplexed doesn't work with accel or accelc however.  Do the 
accelerated protocol implementations have a different interface?  Forgive me 
but I am not a python expert.  Here is the error I am seeing:
   ```
   ERROR: testVoid (__main__.MultiplexedAcceleratedBinaryTest)
   --
   Traceback (most recent call last):
 File "/thrift/src/test/py/TestClient.py", line 75, in testVoid
   self.client.testVoid()
 File "/thrift/src/test/py/gen-py/ThriftTest/ThriftTest.py", line 324, in 
testVoid
   self.send_testVoid()
 File "/thrift/src/test/py/gen-py/ThriftTest/ThriftTest.py", line 330, in 
send_testVoid
   args.write(self._oprot)
 File "/thrift/src/test/py/gen-py/ThriftTest/ThriftTest.py", line 1695, in 
write
   oprot.trans.write(oprot._fast_encode(self, [self.__class__, 
self.thrift_spec]))
 File 
"/thrift/src/lib/py/build/lib.linux-x86_64-2.7/thrift/protocol/TProtocolDecorator.py",
 line 40, in 
   return lambda *args, **kwargs: self._wrap(member, args, kwargs)
 File 
"/thrift/src/lib/py/build/lib.linux-x86_64-2.7/thrift/protocol/TProtocolDecorator.py",
 line 49, in _wrap
   result = func(self.protocol, *args, **kwargs)
   TypeError: function takes exactly 2 arguments (3 given)
   ```
   
   Fixing this would accomplish your goal of making them work together while 
allowing for decoration with other protocols.  I suspect you ran into this and 
that led you to the PR submitted?
   
   I will let you know when the test client is merged, then if you can make the 
test client work with the accelerated protocols and remove the failing tests 
from the known test failures, we'll have a viable solution with tests.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-04-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16432154#comment-16432154
 ] 

ASF GitHub Bot commented on THRIFT-4548:


jeking3 commented on issue #1535: THRIFT-4548: Supporting 
TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python
URL: https://github.com/apache/thrift/pull/1535#issuecomment-380075815
 
 
   I also just noticed you removed protocol decoration entirely; if we had 
cross tests for multi in python (looks like we don't) then this change would 
have busted all the other multi protocol tests.  I'll be adding multi cross 
tests for python.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (THRIFT-4548) Supporting TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python

2018-04-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16430577#comment-16430577
 ] 

ASF GitHub Bot commented on THRIFT-4548:


balazskemenes opened a new pull request #1535: THRIFT-4548: Supporting 
TBinaryProtocolAccelerated protocol when using TMultiplexedProcessor in Python
URL: https://github.com/apache/thrift/pull/1535
 
 
   Updated TMultiplexedProcessor, and new TMultiplexedBinaryProtocolAccelerated 
to support TBinaryProtocolAccelerated in Python
   Client: [lib/py]


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python
> -
>
> Key: THRIFT-4548
> URL: https://issues.apache.org/jira/browse/THRIFT-4548
> Project: Thrift
>  Issue Type: Bug
>Reporter: Balazs Kemenes
>Priority: Major
>
> Supporting TBinaryProtocolAccelerated protocol when using 
> TMultiplexedProcessor in Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)