[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2021-11-19 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset bbe3c57c865439f2194eb760a4362b5506d221a7 by Miss Islington (bot) in branch '3.10': bpo-19072: Classmethod can wrap other classmethod like descriptors (GH-29634) (GH-29643) https://github.com/python/cpython/commit/bbe3c57c865439f2194eb760a4362b5506

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2021-11-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +27875 pull_request: https://github.com/python/cpython/pull/29643 ___ Python tracker ___ __

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2021-11-19 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset e34809e1c2a09478f4e0651d551c9c12d3c556ab by Raymond Hettinger in branch 'main': bpo-19072: Classmethod can wrap other classmethod like descriptors (GH-29634) https://github.com/python/cpython/commit/e34809e1c2a09478f4e0651d551c9c12d3c556ab --

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2021-11-18 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +27866 pull_request: https://github.com/python/cpython/pull/29634 ___ Python tracker ___ ___

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2021-07-15 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 2ce8af3cbcb368a35a05a5a9f97a09405124f239 by Miss Islington (bot) in branch '3.10': bpo-42073: allow classmethod to wrap other classmethod-like descriptors (GH-27115) (GH-27162) https://github.com/python/cpython/commit/2ce8af3cbcb368a35a05a5a9f97a0

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2021-07-15 Thread miss-islington
Change by miss-islington : -- pull_requests: +25699 pull_request: https://github.com/python/cpython/pull/27162 ___ Python tracker ___ __

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2021-07-15 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset b83861f0265e07207a6ae2c49c40fa8f447893f2 by Łukasz Langa in branch 'main': bpo-42073: allow classmethod to wrap other classmethod-like descriptors (#27115) https://github.com/python/cpython/commit/b83861f0265e07207a6ae2c49c40fa8f447893f2

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2021-07-13 Thread Łukasz Langa
Change by Łukasz Langa : -- nosy: +lukasz.langa nosy_count: 11.0 -> 12.0 pull_requests: +25663 pull_request: https://github.com/python/cpython/pull/27115 ___ Python tracker ___

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2021-01-05 Thread Irit Katriel
Irit Katriel added the comment: I've created a followup issue re documentation of this change: issue42832 -- nosy: +iritkatriel ___ Python tracker ___

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2020-10-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset c17f63fae57dc02e78bd6931b8fb6c6c2f9d4d81 by Miss Skeleton (bot) in branch '3.9': bpo-19072: Update descriptor howto for decorator chaining (GH-22934) (GH-22935) https://github.com/python/cpython/commit/c17f63fae57dc02e78bd6931b8fb6c6c2f9d4d81

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2020-10-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 8e5b0fdce337ef0a1f4f38b31a8c6b66c56b16d2 by Raymond Hettinger in branch 'master': bpo-19072: Update descriptor howto for decorator chaining (GH-22934) https://github.com/python/cpython/commit/8e5b0fdce337ef0a1f4f38b31a8c6b66c56b16d2 ---

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2020-10-23 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +21855 pull_request: https://github.com/python/cpython/pull/22935 ___ Python tracker

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2020-10-23 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +21854 pull_request: https://github.com/python/cpython/pull/22934 ___ Python tracker ___ ___

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2020-10-18 Thread Erik Welch
Change by Erik Welch : -- nosy: +eriknw nosy_count: 8.0 -> 9.0 pull_requests: +21721 pull_request: https://github.com/python/cpython/pull/22757 ___ Python tracker ___ _

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2019-08-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2019-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 805f8f9afea116c5d4d000570e3d02ae84502f43 by Raymond Hettinger (Berker Peksag) in branch 'master': bpo-19072: Make @classmethod support chained decorators (GH-8405) https://github.com/python/cpython/commit/805f8f9afea116c5d4d000570e3d02ae84502

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2018-07-23 Thread Berker Peksag
Change by Berker Peksag : -- pull_requests: +7931 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2018-07-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is impossible to get significant impact on the Python benchmark suite from this patch. But mickrobenchmarks can expose the regression if it exists. Something like: ./python -m perf timeit -s 'class A:' -s ' @classmethod' -s ' def cm(cls): p

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2018-07-07 Thread Berker Peksag
Berker Peksag added the comment: > Berker, do you mind to create a PR? I will submit a PR tomorrow. Do you have specific ideas for a micro-benchmark in mind or do you want to me just run the Python benchmark suite against the patch? -- ___ Python

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2018-07-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Berker, do you mind to create a PR? Supporting class properties looks good rationale to me. But we need to check how this change affects performance. -- ___ Python tracker _

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2018-07-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.8 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2016-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: With the patch class properties work: >>> class A: ... @classmethod ... @property ... def __doc__(cls): ... return 'A doc for %r' % cls.__name__ ... >>> A.__doc__ "A doc for 'A'" This is worth to be explicitly documented. -- nosy

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2016-05-05 Thread Berker Peksag
Berker Peksag added the comment: Here is an updated patch with a test (adapted from msg198274.) -- nosy: +berker.peksag stage: -> patch review versions: +Python 3.6 -Python 3.4 Added file: http://bugs.python.org/file42737/issue19072.diff ___ Python t

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2016-01-13 Thread Ionel Cristian Mărieș
Changes by Ionel Cristian Mărieș : -- nosy: +ionelmc ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-10-29 Thread Graham Dumpleton
Graham Dumpleton added the comment: I don't believe so. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-10-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Graham, do we have a contributor agreement from you? -- ___ Python tracker ___ ___ Python-bugs-li

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-10-28 Thread Guido van Rossum
Guido van Rossum added the comment: @grahamd: I occasionally have felt the pain of wrapping @classmethod (or @staticmethod). Never enough though to think of how to fix it. I really don't have the stomach to review your wrapt library, but your code looks okay except for style and missing tests.

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-10-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well... I've not written enough descriptor-implementing code to have a clear opinion on this, but this looks quite obscure. I have personally never needed anything like the wrapt library (I've also never used the PyPI "decorator" module, FWIW). -- nos

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-10-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Antoine, do you have any thoughts on this proposal? -- nosy: +pitrou ___ Python tracker ___ ___ P

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-09-30 Thread Graham Dumpleton
Graham Dumpleton added the comment: If you have the time, would be great if you can have a quick look at my wrapt package. That will give you an idea of where I am coming from in suggesting this change. http://wrapt.readthedocs.org/en/latest/ http://wrapt.readthedocs.org/en/latest/issues.html

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-09-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll take a look at this in more detail in the next week or so. -- ___ Python tracker ___ ___ Pyt

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-09-29 Thread Graham Dumpleton
Graham Dumpleton added the comment: The classmethod __get__() method does: static PyObject * cm_descr_get(PyObject *self, PyObject *obj, PyObject *type) { classmethod *cm = (classmethod *)self; if (cm->cm_callable == NULL) { PyErr_SetString(PyExc_RuntimeError,

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-09-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think it was ever intended that decorators be chained together. The whole point is to control binding behavior during dotted look-up (when __getattribute__ is called) and not in other circumstances (such as a direct lookup in a class dictionary).

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-09-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-09-29 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +daniel.urban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-09-28 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: +Python 3.4 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-09-22 Thread Graham Dumpleton
New submission from Graham Dumpleton: The classmethod decorator when applied to a function of a class, does not honour the descriptor binding protocol for whatever it wraps. This means it will fail when applied around a function which has a decorator already applied to it and where that decora