[issue14857] Direct access to lexically scoped __class__ is broken in 3.3
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset bcb3b81853cc by Nick Coghlan in branch 'default': Tweak importlib._bootstrap to avoid zero-argument super so I can work on issue #14857 without breaking imports http://hg.python.org/cpython/rev/bcb3b81853cc New changeset 96ab78ef82a7 by Nick Coghlan in branch 'default': Close #14857: fix regression in references to PEP 3135 implicit __class__ closure variable. Reopens issue #12370, but also updates unittest.mock to workaround that issue http://hg.python.org/cpython/rev/96ab78ef82a7 -- nosy: +python-dev resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14857] Direct access to lexically scoped __class__ is broken in 3.3
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14857] Direct access to lexically scoped __class__ is broken in 3.3
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14857] Direct access to lexically scoped __class__ is broken in 3.3
Meador Inge mead...@gmail.com added the comment: Ouch. The '__class__' behavior is documented here too: http://docs.python.org/py3k/library/functions.html?highlight=__class__#super. Unfortunately I don't see any other documentation on the lexically scoped form of __class__. As implied, cases like the following just don't work any longer: class X(object): ...def __init__(self): ... super(__class__, self).__init__() ... X() Traceback (most recent call last): File stdin, line 1, in module File stdin, line 3, in __init__ NameError: global name '__class__' is not defined This worked fine in 3.2. -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14857] Direct access to lexically scoped __class__ is broken in 3.3
New submission from Nick Coghlan ncogh...@gmail.com: Currently, __class__ references from methods in 3.3 aren't being mapped correctly to the class currently being defined. This goes against the documented behaviour of PEP 3135, which states explicitly that the new zero-argument form is equivalent to super(__class__, firstarg), where __class__ is the closure reference. This breakage is almost certainly due to the fix for #12370 The fact the test suite didn't break is a sign we also have a gap in our test coverage. Given that a workaround is documented in #12370, but there's no workaround for this breakage, reverting the fix for that issue may prove necessary (unlike that current breakage, at least that wouldn't be a regression from 3.2). -- keywords: 3.2regression messages: 161126 nosy: ncoghlan priority: release blocker severity: normal stage: test needed status: open title: Direct access to lexically scoped __class__ is broken in 3.3 type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com