]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-120381: Fix inspect.ismethoddescriptor() (GH-120684)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 19 Jun 2024 07:01:09 +0000 (09:01 +0200)
committerGitHub <noreply@github.com>
Wed, 19 Jun 2024 07:01:09 +0000 (17:01 +1000)
commit39c3f11f2552f751d7d484d9e27222bcb0a3672e
tree6d8ca481fa64a3e4250ee844ea0b7e32874fd6b1
parenta22eb2f2666c6f0a0ddef7b918222936c71c1ee5
[3.13] gh-120381: Fix inspect.ismethoddescriptor() (GH-120684)

The `inspect.ismethoddescriptor()` function did not check for the lack of
`__delete__()` and, consequently, erroneously returned True when applied
to *data* descriptors with only `__get__()` and `__delete__()` defined.

(cherry picked from commit dacc5ac71a8e546f9ef76805827cb50d4d40cabf)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Doc/library/inspect.rst
Lib/inspect.py
Lib/test/test_inspect/test_inspect.py
Misc/NEWS.d/next/Library/2024-06-12-11-54-05.gh-issue-120381.O-BNLs.rst [new file with mode: 0644]