Skip to content
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

Using the --IPKernelApp.trio_loop=True doesn't appear to set the main loop to use trio #1243

Open
SimonBiggs opened this issue May 29, 2024 · 0 comments

Comments

@SimonBiggs
Copy link

SimonBiggs commented May 29, 2024

To reproduce:

% ipython --IPKernelApp.trio_loop=True
Python 3.11.6 | packaged by conda-forge | (main, Oct  3 2023, 10:37:07) [Clang 15.0.7 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.24.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import trio

In [2]: await trio.sleep(1)
...
RuntimeError: must be called from async context

However the following does work, which is not expected:

% ipython --IPKernelApp.trio_loop=True
Python 3.11.6 | packaged by conda-forge | (main, Oct  3 2023, 10:37:07) [Clang 15.0.7 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.24.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import asyncio

In [2]: await asyncio.sleep(1)

In [3]:

I could have missed something obvious though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant