From 105eadbbac84290818e5809c58bd44f43bea3d2d Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Mon, 4 May 2020 17:26:30 -0500 Subject: [PATCH] Remove monotonic usage The monotonic package was needed for monotonic time operations when running under Python runtimes older than 3.3. Since we now only support versions higher than this, this third party package requirement can now be removed. Change-Id: Id250b92d11aeb6fa02e264610bfe8e8c71df7e26 Signed-off-by: Sean McGinnis --- lower-constraints.txt | 1 - oslo_log/rate_limit.py | 6 +----- requirements.txt | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index fa7175df..ad425cb6 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -22,7 +22,6 @@ keystoneauth1==3.4.0 linecache2==1.0.0 MarkupSafe==1.0 mccabe==0.2.1 -monotonic==1.4;python_version<'3.3' mox3==0.25.0 msgpack==0.5.6 netaddr==0.7.19 diff --git a/oslo_log/rate_limit.py b/oslo_log/rate_limit.py index ae486ab5..05ad581f 100644 --- a/oslo_log/rate_limit.py +++ b/oslo_log/rate_limit.py @@ -14,11 +14,7 @@ import logging - -try: - from time import monotonic as monotonic_clock # noqa -except ImportError: - from monotonic import monotonic as monotonic_clock # noqa +from time import monotonic as monotonic_clock class _LogRateLimit(logging.Filter): diff --git a/requirements.txt b/requirements.txt index 963a95e5..04331e45 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,4 +11,3 @@ oslo.serialization>=2.25.0 # Apache-2.0 debtcollector>=1.19.0 # Apache-2.0 pyinotify>=0.9.6;sys_platform!='win32' and sys_platform!='darwin' and sys_platform!='sunos5' # MIT python-dateutil>=2.7.0 # BSD -monotonic>=1.4;python_version<'3.3' # Apache-2.0