Andrew Svetlov <andrew.svet...@gmail.com> added the comment:

I thought about returning a special subclass.
Future has too rich API: get_loop(), done(), result() etc.

What's about returning the proxy object with future instance embedded; the 
object raises DeprecationWarning for everythin except __repr__, __del__ and 
__await__, __getattr__ redirects to getattr(self._fut, name) for all other 
attributes access. 

It is a more complex solution but definitely 100% backward compatible; plus the 
solution we can prepare people for removing the deprecated code eventually.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38430>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to