Thomas Wouters <tho...@python.org> added the comment: New version of the patch; instead of triggering at attribute *access*, this just checks when creating types and in type_setattro. It also makes the warning a newly added CompatibilityWarning. Also, instead of warning for all non-descriptors, it now only warns for PyCFunctionObjects that do not have a __self__ set, or of which __self__ is a module. (The reason for the latter being the new-ish behaviour of functions defined in modules in C getting passed something as __self__, defaulting to the module.) I've removed a few staticmethod calls from cases that do not trigger the new warning.
This patch still lacks tests and doc updates, but I'm uploading right now because the sprints apparently lose internet soonish. ---------- Added file: http://bugs.python.org/file21271/nonmethod-warn.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11470> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com