[issue16268] dir(closure) does not find __dir__

2012-10-31 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue16268] dir(closure) does not find __dir__

2012-10-30 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> duplicate status: open -> closed superseder: -> Global PyTypeObjects not initialized with PyType_Ready(...) ___ Python tracker

[issue16268] dir(closure) does not find __dir__

2012-10-30 Thread Bradley Froehle
Bradley Froehle added the comment: Your patch looks good to me, and I can verify that it properly tests for the issue in Python 3.3. On a related note, I've found that PyType_Ready(...) isn't called for a few other core PyTypeObjects... see #16369. --

[issue16268] dir(closure) does not find __dir__

2012-10-30 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue16268] dir(closure) does not find __dir__

2012-10-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The same fix, but with a unit test. Note that object.__dir__ did not exist in previous versions, but I found a similar failure with __format__, which also applies to 2.7. -- nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file27801/in

[issue16268] dir(closure) does not find __dir__

2012-10-29 Thread Bradley Froehle
Bradley Froehle added the comment: Note that we fail to initialize PyCell_Type in all versions of Python, even if there aren't any visible ramifications in earlier versions. -- ___ Python tracker _

[issue16268] dir(closure) does not find __dir__

2012-10-29 Thread Bradley Froehle
Bradley Froehle added the comment: This rather obscure bug seems to be caused by a failure to properly initialize PyCell_Type. Running with GDB, we see that _PyType_Lookup(, "__dir__") fails in: /* Look in tp_dict of types in MRO */ mro = type->tp_mro; /* If mro is NULL, the typ

[issue16268] dir(closure) does not find __dir__

2012-10-17 Thread Chris Jerdonek
Chris Jerdonek added the comment: Here is a somewhat simpler way to reproduce (following the same definition of x): >>> dir(x) ... TypeError: object does not provide __dir__ >>> x.__dir__ >>> dir(x) ['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__geta