diff options
-rwxr-xr-x | runtest.py | 5 | ||||
-rw-r--r-- | src/CHANGES.txt | 7 |
2 files changed, 6 insertions, 6 deletions
diff --git a/runtest.py b/runtest.py index 1cac45b83..697b872e2 100755 --- a/runtest.py +++ b/runtest.py @@ -95,10 +95,8 @@ import time import threading try: # python3 from queue import Queue - PY3=True except ImportError as e: # python2 from Queue import Queue - PY3=False import subprocess cwd = os.getcwd() @@ -771,7 +769,8 @@ os.environ["python_executable"] = python # but time.time() does a better job on Linux systems, so let that be # the non-Windows default. -if PY3: +#TODO: clean up when py2 support is dropped +try: time_func = time.perf_counter else: if sys.platform == 'win32': diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 27fe66aaf..d81a9f9c9 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -123,9 +123,10 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE - fix must_contain tests for py3 - one swig test now checks for Python.h instead of failing - if test opens os.devnull, register with atexit so file opens do not leak. - - for py3, use time.perf_counter instead of depr time.clock, which is - used in win32 case for py2. py37 depr warnings were failing a bunch - of tests on windows since warn messes up expected stderr. + - use time.perf_counter instead of time.clock if it exists. + time.clock deprecated since py3.3, due to remove in 3.8. deprecation + warnings from py3.7 were failing a bunch of tests on Windows since they + mess up expected stderr. From Hao Wu - typo in customized decider example in user guide |