]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-120381: Fix inspect.ismethoddescriptor() (#120383)
authorJan Kaliszewski <zuo@kaliszewski.net>
Tue, 18 Jun 2024 12:19:43 +0000 (14:19 +0200)
committerGitHub <noreply@github.com>
Tue, 18 Jun 2024 12:19:43 +0000 (12:19 +0000)
commitdacc5ac71a8e546f9ef76805827cb50d4d40cabf
treebcd0f024d0266970d7edbbbb55a5ead46044b966
parent7c5da94b5d674e112dc77f6494463014b7137193
gh-120381: Fix inspect.ismethoddescriptor() (#120383)

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.

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]