Skip to content

[3.12] gh-124594: Create and reuse the same context for the entire asyncio REPL session (GH-124595) #124849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 28, 2024

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Oct 1, 2024

(cherry picked from commit 67e01a4)

Co-authored-by: Bartosz Sławecki bartoszpiotrslawecki@gmail.com
Co-authored-by: Andrew Svetlov andrew.svetlov@gmail.com

…ncio REPL session (pythonGH-124595)

(cherry picked from commit 67e01a4)

Co-authored-by: Bartosz Sławecki <bartoszpiotrslawecki@gmail.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
@bswck
Copy link
Contributor

bswck commented Oct 1, 2024

The failure seems pretty quirky.

asyncio REPL 3.12.7+ (remotes/pull/124849/merge-dirty:fd216e1, Oct  1 2024, 14:24:15) [GCC 11.4.0] on linux
Use "await" directly instead of "asyncio.run()".
Type "help", "copyright", "credits" or "license" for more information.
>>> import asyncio
>>> >>> >>> ...   File "<console>", line 2
    await set_var()
    ^^^^^
SyntaxError: invalid syntax
>>> toplevel contextvar test: failed
>>>
exiting asyncio REPL...
>>>

(copied from CI)
I'll inspect that further on the 3.12 branch in a couple days.

@asvetlov asvetlov merged commit d89283b into python:3.12 Oct 28, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants