Nathaniel Manista added the comment: gRPC Python is strongly affected by this as well. We use grpc.Future objects (https://github.com/grpc/grpc/blob/e5f99b587338164230b0b2121d242fb015c2ae5a/src/python/grpcio/grpc/__init__.py#L50) to represent RPCs taking place asynchronously. Despite our grpc.Futures being interface-compatible with concurrent.futures.Future objects, we (in our tests) and our users (in their applications) cannot make use of the concurrent.futures.as_completed function (https://github.com/grpc/grpc/blob/e5f99b587338164230b0b2121d242fb015c2ae5a/src/python/grpcio_tests/tests/unit/_rpc_test.py#L388 shows the "wrapping" that has to be done to work around the problem).
It's not at all clear why as_completed shouldn't work with any future objects that are public-interface-compatible with concurrent.futures.Future objects. I would be happy to reimplement the function if my change would be accepted. I part ways with this issue's original reporter in that I don't see the need to widen the public API any further with a "remove_done_callback" method... but maybe I'm missing some small detail? ---------- nosy: +Nathaniel Manista _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22729> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com