-
Notifications
You must be signed in to change notification settings - Fork 93
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
Update prompt_toolkit to be compatible with ipython #344
Comments
I also ran into this with ipython.
What terrible dependency management? There are two packages with conflicting requirements, what is pip (or any other dependency manager) supposed to do other than error out mentioning the conflict? |
I've marked this as an enhancement. Happy to review any PRs for this. |
Currently one test will fail with latest prompt_toolkit(3.0.43). test_blank_line_fix will throw RuntimeError: no running event loop. By bisecting commit, the culprit is prompt-toolkit/python-prompt-toolkit@a775996. This commit replaces custom `get_event_loop` with `asyncio.get_event_loop`. The former will creator a new loop if `asyncio.get_running_loop` fails while the latter won't. I mimic the changes in the examples to use `asyncio.run` and the test passes. I'm not sure whether more changes are needed. Fixes: tmbo#344
Currently one test will fail with latest prompt_toolkit(3.0.43). test_blank_line_fix will throw RuntimeError: no running event loop. By bisecting commit, the culprit is prompt-toolkit/python-prompt-toolkit@a775996. This commit replaces custom `get_event_loop` with `asyncio.get_event_loop`. The former will creator a new loop if `asyncio.get_running_loop` fails while the latter won't. I mimic the changes in the examples to use `asyncio.run` and the test passes. Fixes: tmbo#344
Currently one test will fail with latest prompt_toolkit(3.0.43). test_blank_line_fix will throw RuntimeError: no running event loop. By bisecting commit, the culprit is prompt-toolkit/python-prompt-toolkit@a775996. This commit replaces custom `get_event_loop` with `asyncio.get_event_loop`. The former will creator a new loop if `asyncio.get_running_loop` fails while the latter won't. I mimic the changes in the examples to use `asyncio.run` and the test passes. Fixes: tmbo#344
Currently one test will fail with latest prompt_toolkit(3.0.43). test_blank_line_fix will throw RuntimeError: no running event loop. By bisecting commit, the culprit is prompt-toolkit/python-prompt-toolkit@a775996. This commit replaces custom `get_event_loop` with `asyncio.get_event_loop`. The former will creator a new loop if `asyncio.get_running_loop` fails while the latter won't. I mimic the changes in the examples to use `asyncio.run` and the test passes. Fixes: tmbo#344
Also faced this issue. Would be very much appreciated :) |
I'm facing this issue as well |
PLEASE merge FantasqueX fork into the official repository, the dependency issue is fixed by substituting the official package with the fork. |
This might be related prompt-toolkit/python-prompt-toolkit#1809 |
Currently one test will fail with latest prompt_toolkit(3.0.43). test_blank_line_fix will throw RuntimeError: no running event loop. By bisecting commit, the culprit is prompt-toolkit/python-prompt-toolkit@a775996. This commit replaces custom `get_event_loop` with `asyncio.get_event_loop`. The former will creator a new loop if `asyncio.get_running_loop` fails while the latter won't. I mimic the changes in the examples to use `asyncio.run` and the test passes. Fixes: tmbo#344
Currently one test will fail with latest prompt_toolkit(3.0.43). test_blank_line_fix will throw RuntimeError: no running event loop. By bisecting commit, the culprit is prompt-toolkit/python-prompt-toolkit@a775996. This commit replaces custom `get_event_loop` with `asyncio.get_event_loop`. The former will creator a new loop if `asyncio.get_running_loop` fails while the latter won't. I mimic the changes in the examples to use `asyncio.run` and the test passes. Fixes: tmbo#344
Currently one test will fail with latest prompt_toolkit(3.0.43). test_blank_line_fix will throw RuntimeError: no running event loop. By bisecting commit, the culprit is prompt-toolkit/python-prompt-toolkit@a775996. This commit replaces custom `get_event_loop` with `asyncio.get_event_loop`. The former will creator a new loop if `asyncio.get_running_loop` fails while the latter won't. I mimic the changes in the examples to use `asyncio.run` and the test passes. Fixes: #344
Can you make a bugfix release? v2.0.1 can't be packaged in distro repos as-is because of this problem. If not, packaging v2.0.1 with 9bb5ae1 patch applied will do the thing. |
@CyberTailor A new release will be available in the next couple of days. PR #416. Apologies for the delay. |
Question
Hi, thanks for this wonderful library. My issue when using questionary is that the latest questionary requires prompt_toolkit<=3.0.36 https://github.com/tmbo/questionary/blob/master/pyproject.toml#L36 while another popular tool ipython requires prompt_toolkit>=3.0.41 https://github.com/ipython/ipython/blob/main/setup.cfg#L38. Because of pip's terrible dependency management, I cannot make questionary and ipython be both happy.
I saw you referred to an issue prompt-toolkit/python-prompt-toolkit#1726, however it's not convenient to reproduce with a not well-maintained library(jellex). I wonder whether you can check 3.0.42 prompt_toolkit is compatible with questionary or provide a small reproducible code with questionary. Thank you.
What have you already tried?
Took a look at prompt-toolkit/python-prompt-toolkit#1726
Read the documentation
The text was updated successfully, but these errors were encountered: