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
When examples/validate.py is run with Python 3.7 there are two deprecation warnings:
$ python3 --version
Python 3.7.3
$ python3 examples/validate.py
Loaded 99 schemas.
Loaded 94 examples.
examples/validate.py:93: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead
latestReportTime = time.clock()
examples/validate.py:114: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead
if time.clock() - latestReportTime > 5:
===SUMMARY===
Bad schema files: 0
Bad example files: 0
Successful validations: 94
Failed validations: 0
Unchecked examples: 0
=============
We should replace the time.clock() calls with time.perf_counter() according to the suggestion.
Motivation
Programs should not use deprecated library functions that have been removed from the Python release that was deemed stable over a year ago.
Exemplification
The script will continue to work when users upgrade their OSes the next time.
Benefits
The script won't emit warnings under Python 3.7 and will continue working when users upgrade to Python 3.8.
Possible Drawbacks
We'll effectively drop Python 2 support, but Python 2 was EOLed on 2020-01-01 and any reasonably modern OS will support Python 3.3+.
The text was updated successfully, but these errors were encountered:
Description
When examples/validate.py is run with Python 3.7 there are two deprecation warnings:
We should replace the time.clock() calls with time.perf_counter() according to the suggestion.
Motivation
Programs should not use deprecated library functions that have been removed from the Python release that was deemed stable over a year ago.
Exemplification
The script will continue to work when users upgrade their OSes the next time.
Benefits
The script won't emit warnings under Python 3.7 and will continue working when users upgrade to Python 3.8.
Possible Drawbacks
We'll effectively drop Python 2 support, but Python 2 was EOLed on 2020-01-01 and any reasonably modern OS will support Python 3.3+.
The text was updated successfully, but these errors were encountered: