From 2912676b95dce4cfb17c14493e4d83130ceae1d1 Mon Sep 17 00:00:00 2001 From: Michael Lavers Date: Tue, 10 Apr 2018 10:31:24 -0700 Subject: [PATCH 1/2] Add a compat module, remove six dependency Closes #191 Signed-off-by: Michael Lavers --- iopipe/compat.py | 8 ++++++++ iopipe/context.py | 2 +- tests/contrib/trace/test_plugin.py | 1 + tests/test_report.py | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 iopipe/compat.py diff --git a/iopipe/compat.py b/iopipe/compat.py new file mode 100644 index 00000000..89c8ca2a --- /dev/null +++ b/iopipe/compat.py @@ -0,0 +1,8 @@ +import sys + +PY3 = sys.version_info[0] == 3 + +if PY3: + string_types = str, +else: + string_types = basestring, # noqa diff --git a/iopipe/context.py b/iopipe/context.py index e821b9ab..0fd55089 100644 --- a/iopipe/context.py +++ b/iopipe/context.py @@ -1,8 +1,8 @@ import decimal import numbers import warnings -from six import string_types from . import constants +from .compat import string_types class ContextWrapper(object): diff --git a/tests/contrib/trace/test_plugin.py b/tests/contrib/trace/test_plugin.py index 9fc677e9..8e87eef1 100644 --- a/tests/contrib/trace/test_plugin.py +++ b/tests/contrib/trace/test_plugin.py @@ -33,6 +33,7 @@ def test__trace_plugin__valid_schema(mock_send_report, handler_with_trace, mock_ handler({}, mock_context) assert_valid_schema(iopipe.report.report, optional_fields=[ + 'disk', 'environment.runtime.vendor', 'environment.runtime.vmVendor', 'environment.runtime.vmVersion', diff --git a/tests/test_report.py b/tests/test_report.py index 77e197b9..b437b092 100644 --- a/tests/test_report.py +++ b/tests/test_report.py @@ -12,6 +12,7 @@ def test_report_linux_system_success(mock_context, assert_valid_schema): assert_valid_schema( report.report, optional_fields=[ + 'disk', 'environment.runtime.vendor', 'environment.runtime.vmVendor', 'environment.runtime.vmVersion', @@ -40,6 +41,7 @@ def test_report_linux_system_error(mock_context, assert_valid_schema): assert_valid_schema( report.report, optional_fields=[ + 'disk', 'environment.runtime.vendor', 'environment.runtime.vmVendor', 'environment.runtime.vmVersion', From c92edee7644306169b99c805b812ba2153c2f325 Mon Sep 17 00:00:00 2001 From: Michael Lavers Date: Tue, 10 Apr 2018 10:38:03 -0700 Subject: [PATCH 2/2] Up version for micro release Signed-off-by: Michael Lavers --- iopipe/constants.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iopipe/constants.py b/iopipe/constants.py index a6e880d3..b5e0c097 100644 --- a/iopipe/constants.py +++ b/iopipe/constants.py @@ -6,4 +6,4 @@ PROCESS_ID = str(uuid.uuid4()) TIMESTAMP_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ" METRIC_NAME_LIMIT = 128 -VERSION = '1.4.0' +VERSION = '1.4.1' diff --git a/setup.py b/setup.py index 548c7393..090362d4 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='iopipe', - version='1.4.0', + version='1.4.1', description='IOpipe agent for serverless Application Performance Monitoring', author='IOpipe', author_email='dev@iopipe.com',