[issue30533] missing feature in inspect module: getmembers_static

2021-12-01 Thread Dino Viehland


Change by Dino Viehland :


--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2021-12-01 Thread Dino Viehland


Dino Viehland  added the comment:


New changeset c2bb29ce9ae4adb6a8123285ad3585907cd4cc73 by Weipeng Hong in 
branch 'main':
bpo-30533: Add docs for `inspect.getmembers_static` (#29874)
https://github.com/python/cpython/commit/c2bb29ce9ae4adb6a8123285ad3585907cd4cc73


--

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2021-12-01 Thread hongweipeng


Change by hongweipeng :


--
pull_requests: +28100
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/29874

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2021-11-30 Thread Dong-hee Na


Dong-hee Na  added the comment:

Please update the documentation also.

see: 
https://docs.python.org/3.11/library/inspect.html?highlight=inspect#inspect.getmembers

--
nosy: +corona10
status: closed -> open

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2021-11-30 Thread Dino Viehland


Change by Dino Viehland :


--
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11 -Python 3.9

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2021-11-30 Thread Dino Viehland


Dino Viehland  added the comment:


New changeset af8c8caaf5e07c02202d736a31f6a2f7e27819b8 by Weipeng Hong in 
branch 'main':
bpo-30533:Add function inspect.getmembers_static that does not call properties 
or dynamic properties. (#20911)
https://github.com/python/cpython/commit/af8c8caaf5e07c02202d736a31f6a2f7e27819b8


--
nosy: +dino.viehland

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2021-11-09 Thread Itamar Ostricher


Itamar Ostricher  added the comment:

interested in this too - came here to see if I can implement, but found that a 
patch is already available (GH-20911), and applies cleanly on latest main 
branch (see my PR comments)

would be great if it gets merged!

--
nosy: +itamaro

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2020-06-16 Thread hongweipeng


Change by hongweipeng :


--
keywords: +patch
nosy: +hongweipeng
nosy_count: 5.0 -> 6.0
pull_requests: +20093
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20911

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2020-06-09 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
nosy:  -lys.nikolaou

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2020-06-09 Thread kernc


Change by kernc :


--
nosy: +kernc

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2019-10-29 Thread Batuhan


Change by Batuhan :


--
nosy: +BTaskaya
versions: +Python 3.9 -Python 3.8

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2018-11-05 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
nosy: +lys.nikolaou

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2018-11-04 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

+1 from me too. issue35108 could help from this implementation where properties 
execute code that might cause runtime exception. Initially I tried using 
getattr_static inside getmembers at msg329254 but I think a separate function 
or an option to use getattr_static only in getmembers is more clean.

Bumping the version to 3.8.

Thanks!

--
nosy: +xtreak
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2017-06-02 Thread Lisa Roach

Lisa Roach added the comment:

+1 to a new getmembers_static(), I don't see why this couldn't be implemented.

--
nosy: +lisroach

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2017-05-31 Thread Carl Meyer

New submission from Carl Meyer:

The inspect module contains a getattr_static() function, for accessing an 
arbitrary attribute on a Python object without risking descriptor or 
__getattr__ code execution. This is useful for introspection tools that don't 
want to trigger any side effects.

The inspect module also contains a getmembers() function, which returns a 
mapping of names to values for all the object's members. This function could 
also be very useful to introspection tools, except that internally it uses 
normal getattr, thus reintroduces the risk of arbitrary code execution.

It would be useful to have an equivalent to getmembers() that is 
descriptor-safe. This could be done either by introducing a new 
getmembers_static(), or possibly by adding a `getattr` optional keyword 
argument to getmembers, that would take a getattr-equivalent callable to use in 
fetching attributes from the object. (The latter option might render some 
internal assumptions of getmembers() incorrect, needs experimentation.)

--
components: Library (Lib)
messages: 294876
nosy: carljm
priority: normal
severity: normal
status: open
title: missing feature in inspect module: getmembers_static
type: enhancement
versions: Python 3.7

___
Python tracker 

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