Issue1064

Title Crash with --overall-time-limit and Python 3.10
Priority bug Status resolved
Superseder Nosy List florian, jendrik, malte, silvan
Assigned To florian Keywords
Optional summary

Created on 2022-09-08.00:54:43 by florian, last changed by florian.

Messages
msg10845 (view) Author: florian Date: 2022-09-12.11:12:19
Thanks! This is merged now.
msg10835 (view) Author: malte Date: 2022-09-09.16:09:33
"Controversial" is perhaps saying a bit much, my comments were meant more as suggestions for improvement. I like the current pull request, from my side it's good to merge.
msg10834 (view) Author: florian Date: 2022-09-09.15:34:22
Looks like the change was more controversial than I thought. I updated the pull request, backing out of the change to the print statement and the exception, and extracting a function for rounding time limits with some slack.
msg10833 (view) Author: malte Date: 2022-09-09.10:42:12
> They are a bit tangential to the bug but non-controversial I hope.

In my view cleaning up/fixing things related to the code we fix is good, if it doesn't make the issue too complex or hard to review.
msg10832 (view) Author: florian Date: 2022-09-08.13:32:24
I handled the comments. They are a bit tangential to the bug but non-controversial I hope.
msg10831 (view) Author: jendrik Date: 2022-09-08.12:51:57
I added two comments, but the general fix looks good to me, thanks!
msg10830 (view) Author: florian Date: 2022-09-08.12:34:04
We discussed this on discord and decided to convert all time limits to int as soon as possible:
https://github.com/aibasel/downward/pull/120
msg10829 (view) Author: florian Date: 2022-09-08.00:54:43
If we use --overall-time-limit, our time limits become fractional because a limit for one component is computed as the overall limit minus the elapsed time, which is measured as a float. However, the function setting the limit expects an integer. Up to Python 3.9 floats were automatically converted to ints even though the documentation of the function specified the parameter as an integer. Starting from 3.10, passing a float is considered an error (see https://bugs.python.org/issue43101). For the fix, we simply have to convert our limits to ints. The main question is where to do this.
History
Date User Action Args
2022-09-12 11:12:19floriansetstatus: reviewing -> resolved
messages: + msg10845
2022-09-09 16:09:33maltesetmessages: + msg10835
2022-09-09 15:34:22floriansetmessages: + msg10834
2022-09-09 10:42:12maltesetmessages: + msg10833
2022-09-08 13:32:24floriansetmessages: + msg10832
2022-09-08 12:51:57jendriksetmessages: + msg10831
2022-09-08 12:34:04floriansetstatus: unread -> reviewing
assignedto: florian
messages: + msg10830
2022-09-08 00:54:43floriancreate