Serhiy Storchaka added the comment: Here is sample patch which adds two restrictions. Default reduce method for protocol >= 2 will forbid pickling objects:
1) When tp_new == NULL. 2) Builtins without any of pickle-related methods: __getnewargs_ex__, __getnewargs__ or __getstate__. Are there any other ideas? ---------- components: +Interpreter Core stage: -> patch review type: -> enhancement versions: +Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22995> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com