You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "James E. King, III (JIRA)" <ji...@apache.org> on 2017/04/06 21:54:41 UTC

[jira] [Resolved] (THRIFT-3539) Use self.process_* instead of Processor.process_* in generated processor code

     [ https://issues.apache.org/jira/browse/THRIFT-3539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James E. King, III resolved THRIFT-3539.
----------------------------------------
    Resolution: Won't Fix

Resolving as Won't Fix.  The fix provided causes multiple build failures in CI.

> Use self.process_* instead of Processor.process_* in generated processor code
> -----------------------------------------------------------------------------
>
>                 Key: THRIFT-3539
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3539
>             Project: Thrift
>          Issue Type: Bug
>          Components: Python - Library
>            Reporter: Thomas Bartelmess
>            Assignee: James E. King, III
>
> In our codebase we ended up overriding the process_* handlers because we had some special requirements, how exceptions are handled.
> in the __init__ function of processor the self._processMap refers to all the process_* functions on the Processor class.
> {code}
> def __init__(self):
>   self._processMap = {}
>   self._processMap = Processor.process_foo
> {code}
> The processor should refer to the functions using self, so when they are overridden in the subclass, the subclass implementation is used.
> {code}
> def __init__(self):
>   self._processMap = {}
>   self._processMap = self.process_foo
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)