Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time.clock is removed from py3.8 #471

Merged
merged 4 commits into from
Jan 23, 2020
Merged

Conversation

MridulS
Copy link
Member

@MridulS MridulS commented Jan 16, 2020

Instances of time.clock in consumptionsaving is removed in #455

@MridulS
Copy link
Member Author

MridulS commented Jan 16, 2020

the only option to make it backward compatible with py2.7 is to use time.time() but it is not the recommended way going forward as there is no guarantee that the precision will be better than 1 second, from the official docs

Note that even though the time is always returned as a floating point number, not all systems
provide time with a better precision than 1 second. While this function normally returns non-
decreasing values, it can return a lower value than a previous call if the system clock has been set back between the two calls.

@MridulS
Copy link
Member Author

MridulS commented Jan 16, 2020

Do we make this backward incompatible change? @mnwhite @llorracc

@MridulS MridulS merged commit eb8d1a6 into econ-ark:master Jan 23, 2020
@llorracc
Copy link
Collaborator

@MridulS, what do you think we should do about this?

I was going to say "could you do a global search on HARK, REMARK, and DemARK repos and replace any instances of the use of time.clock() with whatever" but I'm not sure there's a "whatever" that is future-proof. Is there, for py3, an equivalent to "from future import"?

@MridulS
Copy link
Member Author

MridulS commented Feb 15, 2020

for time.clock() there is time.time() which works for both py2 and py3. I have replaced it in HARK, will do it for REMARKs and DemARKs too.

@adsk2050
Copy link

I think these changes are not yet published to the conda-forge.

@MridulS
Copy link
Member Author

MridulS commented Mar 20, 2020

@adsk2050 what version of HARK are you using from Conda-forge?

@adsk2050
Copy link

I installed it by using the command conda install -c conda-forge econ-ark. The version is 0.10.4, but this is the same version as what is showing when I installed from source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants