This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients methane, vstinner
Date 2017-01-25.09:29:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Content handles various Python calls, but not descriptors. Attached patch adds code to display calls to wrapperobject objects.

The patch adds the first "<method-wrapper ...>" line of the traceback:
(gdb) py-bt
Traceback (most recent call first):
  <method-wrapper '__init__' of CodecInfo object at 0x7ffff7e9d7a8>
  File "/home/haypo/prog/python/git_cpython/Lib/encodings/", line 41, in getregentry
  File "/home/haypo/prog/python/git_cpython/Lib/encodings/", line 122, in search_function
    entry = getregentry()

I wrote this patch while working on the issue #29358. Object instanciation is full of wrappers. A better debugger helps to me understand my bugs ;-)

Example to get such tracecback:
haypo@selma$ gdb -args ./python -m test -v test_sys
(gdb) b wrapper_call
(gdb) run
(gdb) py-bt
Traceback (most recent call first):
  <method-wrapper '__init__' of _EnumDict object at 0x7ffff023d388>
  File "/home/haypo/prog/python/default/Lib/", line 66, in __init__
  File "/home/haypo/prog/python/default/Lib/", line 117, in __prepare__
    enum_dict = _EnumDict()
  <built-in method __build_class__ of module object at remote 0x7ffff7f46c58>
  File "/home/haypo/prog/python/default/Lib/", line 509, in <module>
    class Enum(metaclass=EnumMeta):
  <built-in method exec of module object at remote 0x7ffff7f46c58>
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed

I guess that the next step is to write a test ;-)
Date User Action Args
2017-01-25 09:29:36vstinnersetrecipients: + vstinner, methane
2017-01-25 09:29:36vstinnersetmessageid: <>
2017-01-25 09:29:36vstinnerlinkissue29367 messages
2017-01-25 09:29:35vstinnercreate