This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author asvetlov
Recipients Evgeny Nizhibitsky, asvetlov, vstinner, yselivanov
Date 2019-11-01.19:18:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1572635928.4.0.350050499338.issue38430@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-11-01 19:18:48asvetlovsetrecipients: + asvetlov, vstinner, yselivanov, Evgeny Nizhibitsky
2019-11-01 19:18:48asvetlovsetmessageid: <1572635928.4.0.350050499338.issue38430@roundup.psfhosted.org>
2019-11-01 19:18:48asvetlovlinkissue38430 messages
2019-11-01 19:18:48asvetlovcreate