Issue2115
Created on 2014-02-21.17:29:41 by zyasoft, last changed 2015-04-15.20:48:19 by zyasoft.
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
|
msg9018 (view) |
Author: Jim Baker (zyasoft) |
Date: 2014-09-24.00:02:27 |
|
Bound methods are supported as of https://hg.python.org/jython/rev/0e4c6e7d2273
Per my commit message:
Note that any callable object should have this behavior, since there
is no possibility of ambiguity; however, this change did not add such
support for __call__ since it seems to be a bit more complex in how it
interacts with class derivation. But a test, currently skipped, as
been added for such future support.
|
|
Date |
User |
Action |
Args |
2015-04-15 20:48:19 | zyasoft | set | assignee: zyasoft -> |
2014-09-24 00:11:25 | zyasoft | set | title: Not all callables cannot be used for single method interface callbacks -> Callable objects cannot be used as args to Java method params taking single method interfaces |
2014-09-24 00:02:34 | zyasoft | set | priority: normal -> low |
2014-09-24 00:02:28 | zyasoft | set | messages:
+ msg9018 title: Bound methods cannot be used for single method interface callbacks -> Not all callables cannot be used for single method interface callbacks |
2014-05-22 01:24:46 | zyasoft | set | messages:
+ msg8539 |
2014-02-21 17:29:41 | zyasoft | create | |
|