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 mjpieters
Recipients Alexander Prokhorov, Locane, Philipp Rehs, davin, finefoot, hniksic, jjdmon, mjpieters, pitrou, xiang.zhang
Date 2020-09-08.17:12:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1599585133.53.0.981499038372.issue30256@roundup.psfhosted.org>
In-reply-to
Content
Might it be better to just *drop* the AutoProxy object altogether?

All that it adds is a delayed call to MakeProxyType(f"AutoProxy[{typeid}]", exposed) (with exposed defaulting to public_methods(instance)), per instance per process.

It could be replaced by a direct call to `MakeProxyType()`, using `public_methods` directly on the registered type. This wouldn't work for callables that are not classes or where instances add functions to the instance dict, but for those rare cases you can pass in the `exposed` argument.

The advantage is that it would simplify the codebase; no more need to special-case the BaseProxy.__reduce__ method, removing the get_methods() method on the Server class, etc. Less surface for this class of bugs to happen in the future.
History
Date User Action Args
2020-09-08 17:12:13mjpieterssetrecipients: + mjpieters, pitrou, hniksic, davin, xiang.zhang, jjdmon, Alexander Prokhorov, finefoot, Locane, Philipp Rehs
2020-09-08 17:12:13mjpieterssetmessageid: <1599585133.53.0.981499038372.issue30256@roundup.psfhosted.org>
2020-09-08 17:12:13mjpieterslinkissue30256 messages
2020-09-08 17:12:13mjpieterscreate