[issue29922] error message when __aexit__ is not async

2018-04-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since BEFORE_ASYNC_WITH always is followed by GET_AWAITABLE, in future they can be merged into a single instruction (like GET_ANEXT or GET_YIELD_FROM_ITER). -- resolution: -> fixed stage: patch review -> resolved

[issue29922] error message when __aexit__ is not async

2018-04-04 Thread miss-islington
miss-islington added the comment: New changeset 1487cd14bb1e04de5b98fffc5ec41c6cf6b5d5f1 by Miss Islington (bot) in branch '3.6': bpo-29922: Add more tests for error messages in 'async with'. (GH-6370)

[issue29922] error message when __aexit__ is not async

2018-04-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +6084 ___ Python tracker ___

[issue29922] error message when __aexit__ is not async

2018-04-04 Thread miss-islington
miss-islington added the comment: New changeset 785f36c876721c12f653371e9893527a25140624 by Miss Islington (bot) in branch '3.7': bpo-29922: Add more tests for error messages in 'async with'. (GH-6370)

[issue29922] error message when __aexit__ is not async

2018-04-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +6082 ___ Python tracker ___

[issue29922] error message when __aexit__ is not async

2018-04-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2eeac269dd1e04a2a179384576986c3e47895ee0 by Serhiy Storchaka in branch 'master': bpo-29922: Add more tests for error messages in 'async with'. (GH-6370)

[issue29922] error message when __aexit__ is not async

2018-04-04 Thread miss-islington
miss-islington added the comment: New changeset 4fd6c27dc8ba7ca97aa70e1ab98729f2207bbe19 by Miss Islington (bot) in branch '3.6': bpo-29922: Improve error messages in 'async with' (GH-6352)

[issue29922] error message when __aexit__ is not async

2018-04-04 Thread miss-islington
miss-islington added the comment: New changeset fcd4e03e08a2d4ec1cde17beb66e2b22a052500f by Miss Islington (bot) in branch '3.7': bpo-29922: Improve error messages in 'async with' (GH-6352)

[issue29922] error message when __aexit__ is not async

2018-04-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +6081 ___ Python tracker ___ ___

[issue29922] error message when __aexit__ is not async

2018-04-02 Thread Yury Selivanov
Yury Selivanov added the comment: 3.5 is in security fixes only, so don't bother. -- ___ Python tracker ___

[issue29922] error message when __aexit__ is not async

2018-04-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would be hard to backport this to 3.5. Wordcode allows scanning back. -- ___ Python tracker

[issue29922] error message when __aexit__ is not async

2018-04-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +6063 ___ Python tracker ___

[issue29922] error message when __aexit__ is not async

2018-04-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +6062 ___ Python tracker ___

[issue29922] error message when __aexit__ is not async

2018-04-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a68f2f0578bbf812fa2264d0e0bb388340d6e230 by Serhiy Storchaka in branch 'master': bpo-29922: Improve error messages in 'async with' (GH-6352)

[issue29922] error message when __aexit__ is not async

2018-04-02 Thread Ned Deily
Ned Deily added the comment: > Can we backport it to 3.6 too? I suppose so. (Though you'll owe me if you break anything.) -- versions: +Python 3.6 ___ Python tracker

[issue29922] error message when __aexit__ is not async

2018-04-02 Thread Yury Selivanov
Yury Selivanov added the comment: > PR 6352 smells like a bug fix to me and I think it should be OK for 3.7.0b4. Can we backport it to 3.6 too? -- ___ Python tracker

[issue29922] error message when __aexit__ is not async

2018-04-02 Thread Ned Deily
Ned Deily added the comment: PR 6352 smells like a bug fix to me and I think it should be OK for 3.7.0b4. -- versions: +Python 3.7 ___ Python tracker

[issue29922] error message when __aexit__ is not async

2018-04-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue looks unrelated to issue25538. PR 6352 improves error messages without changing bytecode. It is so simple that could be backported to 3.7 if Ned approves this. But it conflicts with issue32949. This way will not work

[issue29922] error message when __aexit__ is not async

2018-04-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +6061 stage: needs patch -> patch review ___ Python tracker

[issue29922] error message when __aexit__ is not async

2017-12-20 Thread Yury Selivanov
Change by Yury Selivanov : -- versions: +Python 3.8 -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue29922] error message when __aexit__ is not async

2017-12-20 Thread Andrew Svetlov
Andrew Svetlov added the comment: It's Interpreter Core problem, not specific to asyncio bug. -- components: +Interpreter Core -asyncio nosy: +asvetlov ___ Python tracker

[issue29922] error message when __aexit__ is not async

2017-03-31 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue29922] error message when __aexit__ is not async

2017-03-29 Thread Frazer McLean
Changes by Frazer McLean : -- nosy: +RazerM ___ Python tracker ___ ___

[issue29922] error message when __aexit__ is not async

2017-03-28 Thread Chewy
Changes by Chewy : -- nosy: +Chewy ___ Python tracker ___ ___ Python-bugs-list

[issue29922] error message when __aexit__ is not async

2017-03-27 Thread Yury Selivanov
Yury Selivanov added the comment: > Would it maybe make sense to implement this as adding an argument to > GET_AWAITABLE to indicate whether it was called from await, __anext__, > __aenter__ or __aexit__? Yes, but it will make it a tad slower (which will also affect await performance). I'll

[issue29922] error message when __aexit__ is not async

2017-03-27 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: duplicate -> stage: resolved -> needs patch status: closed -> open ___ Python tracker

[issue29922] error message when __aexit__ is not async

2017-03-27 Thread Tadhg McDonald-Jensen
Tadhg McDonald-Jensen added the comment: > This is a specific example of the general problem reported in issue 25538. Definitely related, although the part of giving an error "... can't be used in 'await' expression" when no await expression is used isn't covered by that thread so I'm not

[issue29922] error message when __aexit__ is not async

2017-03-27 Thread Yury Selivanov
Yury Selivanov added the comment: > This is a specific example of the general problem reported in issue 25538. It's a bit different code path/problem. But I agree, we should work on making both `with` and `async with` a bit more usable. > Would it be possible to change this so it indicates

[issue29922] error message when __aexit__ is not async

2017-03-27 Thread R. David Murray
R. David Murray added the comment: This is a specific example of the general problem reported in issue 25538. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Traceback from __exit__ method is misleading

[issue29922] error message when __aexit__ is not async

2017-03-27 Thread Tadhg McDonald-Jensen
New submission from Tadhg McDonald-Jensen: When creating a asynchronous context manager if the __aexit__ method is not labeled as async (so it returns None instead of a coroutine) the error has a generic error message: TypeError: object NoneType can't be used in 'await' expression Would it