summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/next/Library
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-19 07:01:09 (GMT)
committerGitHub <noreply@github.com>2024-06-19 07:01:09 (GMT)
commit39c3f11f2552f751d7d484d9e27222bcb0a3672e (patch)
tree6d8ca481fa64a3e4250ee844ea0b7e32874fd6b1 /Misc/NEWS.d/next/Library
parenta22eb2f2666c6f0a0ddef7b918222936c71c1ee5 (diff)
downloadcpython-39c3f11f2552f751d7d484d9e27222bcb0a3672e.zip
cpython-39c3f11f2552f751d7d484d9e27222bcb0a3672e.tar.gz
cpython-39c3f11f2552f751d7d484d9e27222bcb0a3672e.tar.bz2
[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>
Diffstat (limited to 'Misc/NEWS.d/next/Library')
-rw-r--r--Misc/NEWS.d/next/Library/2024-06-12-11-54-05.gh-issue-120381.O-BNLs.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2024-06-12-11-54-05.gh-issue-120381.O-BNLs.rst b/Misc/NEWS.d/next/Library/2024-06-12-11-54-05.gh-issue-120381.O-BNLs.rst
new file mode 100644
index 0000000..44f49bc
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-06-12-11-54-05.gh-issue-120381.O-BNLs.rst
@@ -0,0 +1,2 @@
+Correct :func:`inspect.ismethoddescriptor` to check also for the lack of
+:meth:`~object.__delete__`. Patch by Jan Kaliszewski.