[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2021-09-07 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2021-08-24 Thread Anthony Sottile
Anthony Sottile added the comment: this maybe shouldn't have been backported to 3.8.x as the change in compiler flags appears to break pyc files in subtle ways: https://stackoverflow.com/q/68910329/812183 -- nosy: +Anthony Sottile ___ Python track

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-07-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > As the changes here has been released maybe you want to reclose and marked > https://bugs.python.org/issue41218 as blocker it should also be fixed by https://github.com/python/cpython/pull/21357 Thanks for the heads up, Matthias! Yes, I think is the

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-07-06 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Pablo, I see you reopened and marked as blocker, As the changes here has been released maybe you want to reclose and marked https://bugs.python.org/issue41218 as blocker it should also be fixed by https://github.com/python/cpython/pull/21357 --

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-07-06 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- priority: -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-07-06 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: fixed -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailin

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-07-06 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: This make non-await list comprehension coroutine-code-objects as well: https://bugs.python.org/issue41218 import ast import inspect cell = '[x for x in l]' code = compile(cell, "<>", "exec", flags=getattr(ast,'PyCF_ALLOW_TOP_LEVEL_AWAIT

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-05-14 Thread STINNER Victor
STINNER Victor added the comment: I tested manually the just released Python 3.8.3 with msg365311: I confirm that it's fixed. Thanks! -- priority: release blocker -> resolution: -> fixed status: open -> closed ___ Python tracker

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: I reopen the bug to ensure that the fix will land into Python 3.8.3. The issue is marked as release blocker. -- resolution: fixed -> status: closed -> open ___ Python tracker

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-05-01 Thread Miro Hrončok
Miro Hrončok added the comment: I just did. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-05-01 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: -yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-05-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The merge is in 3.8 master, so we need to make sure that Łukasz includes this on the 3.8.3 release. Victor sent an email to python-dev already about this issue. If you want to make absolutely sure this happens, maybe send an email directly to Łukasz.

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-05-01 Thread Miro Hrončok
Miro Hrončok added the comment: Fedora packagers report that this problem is now showing up in 3.8.3rc1. What can be done to ensure that 3.8.3 final will contain the fix? -- nosy: +hroncok ___ Python tracker ___

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-05-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 71e6122b4428ae43e868e34db4f072635f58a555 by Pablo Galindo in branch '3.8': bpo-39562: Correctly updated the version section in the what's new document (GH-19838) https://github.com/python/cpython/commit/71e6122b4428ae43e868e34db4f072635f

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-05-01 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +19156 pull_request: https://github.com/python/cpython/pull/19838 ___ Python tracker ___ ___

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-05-01 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-05-01 Thread miss-islington
miss-islington added the comment: New changeset 5055c274c6e4f2bb8025910dedf0ff89f4bdd170 by Pablo Galindo in branch '3.8': [3.8] bpo-39562: Prevent collision of future and compiler flags (GH-19230) (GH-19835) https://github.com/python/cpython/commit/5055c274c6e4f2bb8025910dedf0ff89f4bdd170

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-05-01 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +19153 pull_request: https://github.com/python/cpython/pull/19835 ___ Python tracker ___ ___

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-04-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I think we should backport the fix 4454057269b995341b04d13f0bf97f96080f27d0 (change constants) to 3.8 given that the likelihood of users using the actual hardcoded value of the constants instead of the constants themselves is very low. Also, given the

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-04-22 Thread STINNER Victor
STINNER Victor added the comment: > bpo-39562: Prevent collision of future and compiler flags (GH-19230) > https://github.com/python/cpython/commit/4454057269b995341b04d13f0bf97f96080f27d0 I tested manually: this change fix my msg365311 reproducer. Thanks! In Python 3.8, PyCF_ALLOW_TOP_LEVEL_

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-04-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4454057269b995341b04d13f0bf97f96080f27d0 by Batuhan Taşkaya in branch 'master': bpo-39562: Prevent collision of future and compiler flags (GH-19230) https://github.com/python/cpython/commit/4454057269b995341b04d13f0bf97f96080f27d0 -- _

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-04-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Either the regression should be fixed, or the commits which introduced the > regression should be reverted. If you do that we will have now two problems: * The asyncio repr will not work correctly. * The flags in compile still have a clash. The sol

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-04-20 Thread STINNER Victor
STINNER Victor added the comment: Either the regression should be fixed, or the commits which introduced the regression should be reverted. I'm talking about python-gmpy2 doctest which pass on Python 3.8: msg365311. -- ___ Python tracker

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-04-20 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: GH 19230: (.venv) [ 6:17PM ] [ isidentical@threeheadedgiant:~ ] $ ./cpython/python z.py ** File "/home/isidentical/doctest.txt", line 4, in doctest.txt Failed example: await __import__(

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-04-20 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > Is there an update of this *release blocker* issue? Should we revert the > commit 9052f7a41b90f2d34011c8da68f9a4facebc8a97? I dont think we can gain much by reverting 9052f7a41b90f2d34011c8da68f9a4facebc8a97 because it doesn't introduce a new issue, it j

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-04-20 Thread STINNER Victor
STINNER Victor added the comment: Is there an update of this *release blocker* issue? Should we revert the commit 9052f7a41b90f2d34011c8da68f9a4facebc8a97? -- ___ Python tracker

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-04-06 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: #define IS_COMPILER_FLAG_ENABLED(c, flag) printf("%s: %d\n", #flag, c->c_flags->cf_flags & flag) > If CO_FUTURE_DIVISION conflicts with PyCF_ALLOW_TOP_LEVEL_AWAIT, does not > CO_ITERABLE_COROUTINE conflict with PyCF_SOURCE_IS_UTF8 and > CO_ASYNC_GENERATOR

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If CO_FUTURE_DIVISION conflicts with PyCF_ALLOW_TOP_LEVEL_AWAIT, does not CO_ITERABLE_COROUTINE conflict with PyCF_SOURCE_IS_UTF8 and CO_ASYNC_GENERATOR with PyCF_DONT_IMPLY_DEDENT? -- ___ Python tracker

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-30 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +18590 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/19230 ___ Python tracker ___ _

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-30 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: Sending a patch that would prevent this collision. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-30 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: Both PyCF_ALLOW_TOP_LEVEL_AWAIT and CO_FUTURE_DIVISION has same value. -- ___ Python tracker ___ ___

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-30 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +lukasz.langa priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list ma

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-30 Thread STINNER Victor
STINNER Victor added the comment: This change caused python-gmpy2 tests to fail: https://bugzilla.redhat.com/show_bug.cgi?id=1817710 Reproducer: --- from __future__ import print_function, division import doctest filename = "doctest.txt" with open(filename, "w") as fp: print(""" Test

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-19 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-19 Thread miss-islington
miss-islington added the comment: New changeset ec8a973f7cf080d9c0679f058b2371f0b7c7862c by Miss Islington (bot) in branch '3.8': bpo-39562: Allow executing asynchronous comprehensions in the asyncio REPL (GH-18968) https://github.com/python/cpython/commit/ec8a973f7cf080d9c0679f058b2371f0b7c

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-19 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +18425 pull_request: https://github.com/python/cpython/pull/19070 ___ Python tracker _

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 9052f7a41b90f2d34011c8da68f9a4facebc8a97 by Batuhan Taşkaya in branch 'master': bpo-39562: Allow executing asynchronous comprehensions in the asyncio REPL (GH-18968) https://github.com/python/cpython/commit/9052f7a41b90f2d34011c8da68f9a4f

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-14 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: -18355 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-14 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +18357 pull_request: https://github.com/python/cpython/pull/19010 ___ Python tracker ___ ___

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-14 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal nosy_count: 5.0 -> 6.0 pull_requests: +18355 pull_request: https://github.com/python/cpython/pull/19010 ___ Python tracker ___

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-12 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +18316 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18968 ___ Python tracker ___

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-02-14 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-02-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-02-05 Thread jack1142
jack1142 added the comment: I also noticed that putting `await` before the async comprehension will make the code inside the comprehension run (though after it runs, it will fail on awaiting list): >>> await [await asyncio.sleep(1, print(x)) for x in range(5)] 0 1 2 3 4 Traceback (most rece

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-02-05 Thread jack1142
New submission from jack1142 : asyncio REPL doesn't allow using asynchronous comprehensions outside of async func. Same behavior can also be observed when using `ast.PyCF_ALLOW_TOP_LEVEL_AWAIT` flag in `compile()` Example with `async for`: >>> async def async_gen(): ... for x in range(5):