Closed sigttou closed 3 years ago
Hello @sigttou and thank you for sending a PR with this fix!
While it is most true that time.clock()
needs to be replaced to work with newer versions of Python, there is however a problem with backwards compatibility (since Caring Caribou also supports Python versions down to 2.7).
Would you be able to address this as well? One simple way would be to do something like this at the top of the file:
import time
# Fix for backward compatibility with Python versions older than 3.3,
# where time.process_time is not available
try:
time.process_time
except AttributeError:
time.process_time = time.clock
Doing this and keeping the change in your commit to use time.process_time
would result in adding support for newer versions without breaking it for older ones.
If you fix this, I would be happy to accept your PR straight away!
Yeah sure, thanks for pointing this out, didn't think of python 2.x no more 👍
Excellent! Thanks a lot 😃
@sigttou By the way, would you like to be listed under the Contributors section?
https://github.com/CaringCaribou/caringcaribou#contributors
If so, just let me know which name/handle you prefer and I'll put it in!
Hi, "sigttou' is just fine, thank you :)
Great! Thank you for contributing 😃👍
https://github.com/CaringCaribou/caringcaribou/commit/dab7678ca19c5d0abff7bb1e0c6b1b8b83fa55a3
fix compatibility with python 3.8 (time.clock() deprecated since 3.3)