[New-bugs-announce] [issue31184] Fix data descriptor detection in inspect.getattr_static

David Halter report at bugs.python.org
Fri Aug 11 12:22:11 EDT 2017


New submission from David Halter:

inspect.getattr_static is currently not identifying data descriptors the right way.

Data descriptors are defined by having a __get__ attribute and at least one of the __set__ and __delete__ attributes.

Implementation detail: Both __delete__ and __get__ set the same slot called tp_descr_set in CPython.

I have attached a patch that fixes the issue IMO.

----------
files: 0001-Fix-data-descriptor-detection-in-inspect.getattr_sta.patch
keywords: patch
messages: 300170
nosy: davidhalter
priority: normal
severity: normal
status: open
title: Fix data descriptor detection in inspect.getattr_static
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file47078/0001-Fix-data-descriptor-detection-in-inspect.getattr_sta.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31184>
_______________________________________


More information about the New-bugs-announce mailing list