[issue31184] Fix data descriptor detection in inspect.getattr_static

2021-12-07 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee: rhettinger -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31184] Fix data descriptor detection in inspect.getattr_static

2021-12-07 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Can you give an example of where getattr_static() is not doing what you expect?

--
assignee:  -> rhettinger
components: +Library (Lib)
nosy: +rhettinger
type:  -> behavior
versions:  -Python 3.10, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 
3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31184] Fix data descriptor detection in inspect.getattr_static

2021-12-07 Thread David Halter


David Halter  added the comment:

This is not a duplicate. It is related to https://bugs.python.org/issue26103, 
because __get__ is not required anymore for an object to be a data descriptor. 
The current code on master (of inspect.getattr_static) still thinks a 
descriptor has both __get__ and __set__ set.

Since issue #26103 has been fixed, it's now clear that my patch is slightly 
wrong, but I'm happy to fix that if someone is actually going to review it.

--
resolution: duplicate -> 
status: closed -> open
versions: +Python 3.10, Python 3.11, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31184] Fix data descriptor detection in inspect.getattr_static

2021-11-28 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Contradiction in definition of "data descriptor" between 
(dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor 
how-to)

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31184] Fix data descriptor detection in inspect.getattr_static

2017-08-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue26103.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31184] Fix data descriptor detection in inspect.getattr_static

2017-08-11 Thread David Halter

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com