harvimt / quamash

Implementation of the PEP 3156 event-loop (asyncio) api using the Qt Event-Loop
BSD 2-Clause "Simplified" License
265 stars 46 forks source link

Explicitly convert float to int for startTimer #129

Open stanislavlevin opened 2 years ago

stanislavlevin commented 2 years ago

As of Python3.10:

Builtin and extension functions that take integer arguments no longer accept Decimals, Fractions and other objects that can be converted to integers only with a loss (e.g. that have the int() method but do not have the index() method). (Contributed by Serhiy Storchaka in bpo-37999.)

startTimer accepts only integers (milliseconds) and fails to implicitly convert floats.

Fixes: https://github.com/harvimt/quamash/issues/128