Skip to content

Commit eed8744

Browse files
prompt_toolkit compatibility: call_from_executor expects _max_postpone_until to be a 'time.time()' float.
(requires latest development version of prompt_toolkit.)
1 parent 51cedf1 commit eed8744

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pymux/process.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import sys
2020
import time
2121
import traceback
22-
import datetime
2322

2423
__all__ = (
2524
'Process',
@@ -297,7 +296,7 @@ def do_asap():
297296
# that we will process max 1k/1s in case of saturation.
298297
# That should be enough to prevent the UI from feeling
299298
# unresponsive.
300-
timestamp = datetime.datetime.now() + datetime.timedelta(seconds=1)
299+
timestamp = time.time() + 1
301300

302301
self.eventloop.call_from_executor(
303302
do_asap, _max_postpone_until=timestamp)

0 commit comments

Comments
 (0)