Serhiy Storchaka added the comment:

What are your thoughts Barry? staticmethod, classmethod and property objects 
are incorrectly pickled in 2.7 and 3.5 (they are not pickleable in 3.6+). 
Making them not pickleable in 2.7 and 3.5 can help to catch programming errors.

But this can break the code that "just works" (actually works incorrectly) if 
it pickles or deepcopies complex objects containing staticmethod, classmethod 
or property objects, but never use it. Similar situation happened in issue22995 
with Cython objects.

Maybe emitting a warning rather than an exception would be safer? But 
deprecation warnings are ignored by default.

----------

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

Reply via email to