bpo-31786: Make select.poll.poll block if ms < 0 for every value of ms by pablogsal · Pull Request #4003 · python/cpython
@Haypo I have implemented ROUND_UP in pytime.h and pytime.c following your instructions and substitute the usage of ROUND_CEILING in the select module. Please, if you are happy with this implementation, check that the usage of the new ROUND_UP is correct (I think it is but maybe I am missing something).
@serhiy-storchaka I have updated the test so it takes into account more infinite timeout values.
If you prefer a different implementation or use this in more/less places, say so and I will update this PR.
Thank you for your time reviewing this PR! 😄