Author ncoghlan
Recipients Rotem Yaari, Yury.Selivanov, georg.brandl, gregory.p.smith, gvanrossum, larry, ncoghlan, oconnor663, serhiy.storchaka, vstinner, yselivanov
Date 2016-06-13.23:03:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thanks Serhiy. I've attached a new file ( with a context manager that is deliberately buggy in the same way as contextlib._GeneratorContextManager is currently, so the new test can be made independent of #27122 being fixed (Greg Smith has a pending patch to make that CM well behaved again, which would currently lead to your new test passing for the wrong reasons) also shows why I think "make it work" is the right answer here - the odd context chaining is tolerated in the case where the interpreter is implicitly setting the exception context, so I believe it should also be tolerated when ExitStack sets the context explicitly. If we "do the right thing" (where "right" = "the same as what the interpreter does") in the setter, then not only ExitStack, but anyone else setting __context__ should automatically benefit from the adjustment.
Date User Action Args
2016-06-13 23:03:57ncoghlansetrecipients: + ncoghlan, gvanrossum, georg.brandl, gregory.p.smith, vstinner, larry, Yury.Selivanov, serhiy.storchaka, yselivanov, oconnor663, Rotem Yaari
2016-06-13 23:03:57ncoghlansetmessageid: <>
2016-06-13 23:03:57ncoghlanlinkissue25782 messages
2016-06-13 23:03:57ncoghlancreate