Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upOverflowError with asyncio.sleep #259
Closed
Labels
Comments
Yeah, makes sense. Care to make a PR? |
|
I've just published https://github.com/MagicStack/uvloop/releases/tag/v0.14.0rc1. Please test. The final release will be published some time next week if RC1 is OK. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PYTHONASYNCIODEBUGin env?: yesThis issue is related to #102 ("Should
float("inf")for timeout raise an Overflow error?")uvloop throws an OverflowError if you pass
asyncio.sleepa large enough delay.Thanks to #102, uvloop handles the
float("inf")case, but other large numbers (likesys.maxsize) still cause an exception to be thrown.uvloop/uvloop/loop.pyx
Lines 1287 to 1294 in 88608b8
Perhaps if
round(delay * 1000)is greater than2^64 − 1, it should be reduced to be equal to that, to avoid OverflowErrors from occurring.Here is some code to reproduce the error:
It produces the output: