Issue2115

classification
Title: Bound methods cannot be used for single method interface callbacks
Type: behaviour Severity: normal
Components: Core Versions: Jython 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: zyasoft Nosy List: zyasoft
Priority: normal Keywords:

Created on 2014-02-21.17:29:41 by zyasoft, last changed 2014-05-22.01:24:46 by zyasoft.

Messages
msg8242 (view) Author: Jim Baker (zyasoft) Date: 2014-02-21.17:29:40
As seen in the socket-reboot project, it's necessary to wrap calls to bound methods with a function so that it can be directly used by single method interfaces, eg:

        def workaround_jython_bug_for_bound_methods(_):
            self._notify_selectors()

        future.addListener(workaround_jython_bug_for_bound_methods)

The likely solution is to add a PyMethod#__java__, taking in account being bound or not, comparable to PyFunction#__java__.
msg8539 (view) Author: Jim Baker (zyasoft) Date: 2014-05-22.01:24:46
Target beta 4
History
Date User Action Args
2014-05-22 01:24:46zyasoftsetmessages: + msg8539
2014-02-21 17:29:41zyasoftcreate