[issue29902] copy breaks staticmethod

2017-08-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Benjamin. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29902] copy breaks staticmethod

2017-08-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3dd1ccbb0950b2b83713a495958c35d60b453fa9 by Serhiy Storchaka in branch '2.7': bpo-29902: Emit a Py3k deprecation warning when pickling or copying (#2823) https://github.com/python/cpython/commit/3dd1ccbb0950b2b83713a495958c35d60b453fa9

[issue29902] copy breaks staticmethod

2017-08-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: I don't think it's too important, though most py3k warnings have been DeprecationWarning. You can think of it as deprecating a misfeature. -- ___ Python tracker

[issue29902] copy breaks staticmethod

2017-08-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Benjamin for your review! But I have a design question. Is DeprecationWarning a correct warning type? DeprecationWarning is used when some feature less or more works in the current version, but will be removed in future releases. But pickling

[issue29902] copy breaks staticmethod

2017-07-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> benjamin.peterson nosy: +benjamin.peterson ___ Python tracker ___

[issue29902] copy breaks staticmethod

2017-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: But I think it is worth to add a check and emit a deprecation warning in Py3k mode in 2.7. 2.7 has longer support term than 3.5. And since it is less compatible with 3.6, it is harder to use 3.6 for testing 2.7 programs. -- stage: -> patch review

[issue29902] copy breaks staticmethod

2017-07-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2875 ___ Python tracker ___ ___

[issue29902] copy breaks staticmethod

2017-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have decided to not merge these changes in 3.5. They help to avoid programmatic errors, but have a non-zero chance of breaking programs that work by accidence. Since this is the last non-secure bugfix we will not have a chance to rollback these changes.

[issue29902] copy breaks staticmethod

2017-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If add just warnings we are free to add any warnings in 2.7 in Py3k compatible mode (option -3). -- ___ Python tracker

[issue29902] copy breaks staticmethod

2017-04-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'd be very hesitant to add anything to 2.7 that changes (even broken) behavior here. It might make more sense to backport the more strict checks to 3.5. OTOH, we can save people from all programming errors, and if warnings are basically ignored (plus,

[issue29902] copy breaks staticmethod

2017-04-16 Thread Serhiy Storchaka
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

[issue29902] copy breaks staticmethod

2017-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue was fixed by issue22995 in 3.6. But for some reasons the general solution was not applied to 3.5 and 2.7. Proposed patch makes staticmethod, classmethod and property descriptors explicitly non-pickleable (as was made explicitly non-pickleable

[issue29902] copy breaks staticmethod

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +822 ___ Python tracker ___ ___

[issue29902] copy breaks staticmethod

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Copying and pickling of staticmethod objects are not supported. Starting from 3.6 this raises an exception (see issue22995). >>> bar.y = copy(staticmethod(foo)) Traceback (most recent call last): File "", line 1, in File

[issue29902] copy breaks staticmethod

2017-03-25 Thread Bruce Frederiksen
New submission from Bruce Frederiksen: Doing a copy on a staticmethod breaks it: Python 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from copy import copy >>> def foo(): pass ... >>> class bar: