You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In your clock() function inside the utils module you are using this method making this whole package unusable (in case the resource module is not importable)
# Use the resource module instead of time.clock() if possible (on Unix)
try:
import resource
except ImportError:
import time
def clock():
"""
Under Windows, system CPU time can't be measured. Return time.clock()
as user time and None as system time.
"""
return time.clock(), None
else:
def clock():
"""
Returns a tuple (t_user, t_system) since the start of the process.
This is done via a call to resource.getrusage, so it avoids the
wraparound problems in time.clock().
"""
return resource.getrusage(resource.RUSAGE_CHILDREN)[:2]
I don't know how willingly are you about still maintaining this repository. But I had to change this locally in my windows machine.
The text was updated successfully, but these errors were encountered:
Thank you for the heads up! It's definitely been several years since I've touched this project, but the patch was simple enough, so I've gone and addressed this (hopefully) in 076dc90, and added Python 3.8 to the build matrix to catch other regressions.
I'll try to push a new package release if I can remember how to do that…
As you can see in this issue from the CPython repository the method time.clock() has been removed as of version 3.8 (Official python bug).
In your
clock()
function inside theutils
module you are using this method making this whole package unusable (in case theresource
module is not importable)I don't know how willingly are you about still maintaining this repository. But I had to change this locally in my windows machine.
The text was updated successfully, but these errors were encountered: