Message355836
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. |
|
Date |
User |
Action |
Args |
2019-11-01 19:18:48 | asvetlov | set | recipients:
+ asvetlov, vstinner, yselivanov, Evgeny Nizhibitsky |
2019-11-01 19:18:48 | asvetlov | set | messageid: <1572635928.4.0.350050499338.issue38430@roundup.psfhosted.org> |
2019-11-01 19:18:48 | asvetlov | link | issue38430 messages |
2019-11-01 19:18:48 | asvetlov | create | |
|