-
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
Try to support prompt_toolkit >3.0.37 #347
Conversation
e44f75d
to
c4c95da
Compare
@kiancross Hi, could you please take a look at this? I'm not sure whether I have to do more except making all tests pass. |
c4c95da
to
e3eea63
Compare
e3eea63
to
ac81bf2
Compare
ac81bf2
to
670653d
Compare
I've fixed code quality problem. Gently ping~ |
Any update please? |
@FantasqueX Please could you merge latest changes into this branch and then I can run the CI. |
670653d
to
78df02a
Compare
@kiancross Done :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI is currently failing because there was a breaking change in 3.0.29
, which changed the return type of create_pipe_input
. Prior to this version, it did not return a context manager.
prompt-toolkit/python-prompt-toolkit@97ac514
Given we support these previous versions of prompt_toolkit
(for reasons I am unaware of), I suppose some conditional logic needs to be added here?
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
78df02a
to
6fd05b4
Compare
@kiancross Hi, I have added some conditional logic and make CI happy. Could you please review it again :) |
c856b3b
to
6fd05b4
Compare
Hello, can we tag a new version who is carrying this fix ? |
I'll push a new version within the next week. |
Hello, could we get a new release with this fix? |
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
withasyncio.get_event_loop
. The former will creator a new loop ifasyncio.get_running_loop
fails while the latter won't. I mimic the changes in the examples to useasyncio.run
and the test passes. I'm not sure whether more changes are needed.What is the problem that this PR addresses?
Closes: #344
How did you solve it?
Use
asyncio.run
to make the test pass.Checklist