[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Martin for your patch. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___ _

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset f0053d05ed6d by Serhiy Storchaka in branch '3.4': Issue #24336: The contextmanager decorator now works with functions with https://hg.python.org/cpython/rev/f0053d05ed6d New changeset 20aa7083057e by Serhiy Storchaka in branch '3.5': Issue #24336: T

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-06-27 Thread Nick Coghlan
Nick Coghlan added the comment: My apologies Serhiy, I forgot this was directly assigned to me - all yours now! -- assignee: ncoghlan -> serhiy.storchaka ___ Python tracker ___ _

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-06-27 Thread Yury Selivanov
Yury Selivanov added the comment: lgtm.. Serhiy, I think you should just commit it. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-06-27 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-06-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-06-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Martin Panter
Martin Panter added the comment: Here is a patch with just the test case for 2.7, although I don’t have a strong opinion on whether it needs to be added or not. -- Added file: http://bugs.python.org/file39577/context-kw-2.7.patch ___ Python tracker

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. The patch isn't applied cleanly to 2.7. If you Martin will provide the patch with tests for 2.7, I don't see why not apply it. -- ___ Python tracker __

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Nick Coghlan
Nick Coghlan added the comment: The v3 patch looks good to me, and indeed it's a regression I introduced back in 3.2. I don't see much value in adding the test to the 2.7 test suite (with contextlib2 just a pip install away, it's very unlikely the standard library version will see any signifi

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Martin Panter
Martin Panter added the comment: But maybe it wouldn’t hurt adding the test case in test_contextlib to Python 2. -- versions: +Python 2.7 ___ Python tracker ___ _

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Martin Panter
Martin Panter added the comment: New version with simpler test; thanks Serhiy. Looking closer at the history, this actually seems to be a regression caused by revision e4ba097123f6 (Issue 11647). Python 2 is not affected. -- Added file: http://bugs.python.org/file39574/context-kw.v3.pa

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Library (Lib) nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailin

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> ncoghlan nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Martin Panter
Martin Panter added the comment: Sorry here’s a better version that adapts some monkey-patching in the test suite (test_with). -- Added file: http://bugs.python.org/file39572/context-kw.v2.patch ___ Python tracker

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Martin Panter
New submission from Martin Panter: This patch allows many context managers to accept keyword arguments called “func” and “self”. Current behaviour: >>> with TestCase().subTest(func="blaua"): pass ... Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.4/contextli