- Add python313.patch to make it compatible with python313, gh#census-instrumentation/opencensus-python#1248 - Update to 1.1.14 * Remove status code 206 from retry code + only count batch level for statsbeat (#1247) - from version 1.1.13 * Changed bit-mapping for httpx and fastapi integrations - from version 1.1.12 * Fix missing/None fields in ExceptionDetails (#1232) * Fix missing/None typeName field in ExceptionDetails (#1234) - from version 1.1.11 * Add str fallback to envelope serialization (#1196) * Remove outerId from exceptiondata (#1221) - from version 1.1.10 * Various bug fixes - from version 1.1.9 * Fix export of exception information in traces (#1187) * Modify metrics exporter to include setting export interval to 60s - from version 1.1.8 * Disable storage for statsbeat if storage is disabled for exporter (#1155) * Add UK to eu statsbeats (#1181) - from version 1.1.7 * Add storage existence checks to storing and transmitting in exporter (#1150) * Add 502 and 504 status codes as retriable (#1153) * Fix statsbeat bug - exporting zero values for network statsbeat OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-opencensus-ext-azure?expand=0&rev=12
1201 lines
41 KiB
Diff
1201 lines
41 KiB
Diff
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-azure/tests/test_azure_log_exporter.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-azure/tests/test_azure_log_exporter.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-azure/tests/test_azure_log_exporter.py
|
|
@@ -17,7 +17,10 @@ import os
|
|
import shutil
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.ext.azure import log_exporter
|
|
from opencensus.ext.azure.common.transport import TransportStatusCode
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-azure/tests/test_azure_metrics_exporter.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-azure/tests/test_azure_metrics_exporter.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-azure/tests/test_azure_metrics_exporter.py
|
|
@@ -16,7 +16,10 @@ import shutil
|
|
import unittest
|
|
from datetime import datetime
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.common import utils
|
|
from opencensus.ext.azure.common.protocol import DataPoint
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-azure/tests/test_azure_standard_metrics.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-azure/tests/test_azure_standard_metrics.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-azure/tests/test_azure_standard_metrics.py
|
|
@@ -16,7 +16,10 @@ import collections
|
|
import sys
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
import requests
|
|
|
|
from opencensus.ext.azure.metrics_exporter import standard_metrics
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-azure/tests/test_azure_statsbeat_metrics.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-azure/tests/test_azure_statsbeat_metrics.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-azure/tests/test_azure_statsbeat_metrics.py
|
|
@@ -17,7 +17,10 @@ import os
|
|
import platform
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
import requests
|
|
|
|
from opencensus.ext.azure.common import Options
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-azure/tests/test_azure_trace_exporter.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-azure/tests/test_azure_trace_exporter.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-azure/tests/test_azure_trace_exporter.py
|
|
@@ -17,7 +17,10 @@ import os
|
|
import shutil
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.ext.azure import trace_exporter
|
|
from opencensus.ext.azure.common.transport import TransportStatusCode
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-azure/tests/test_storage.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-azure/tests/test_storage.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-azure/tests/test_storage.py
|
|
@@ -16,7 +16,10 @@ import os
|
|
import shutil
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.ext.azure.common.storage import (
|
|
LocalFileBlob,
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-azure/tests/test_transport_mixin.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-azure/tests/test_transport_mixin.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-azure/tests/test_transport_mixin.py
|
|
@@ -17,7 +17,10 @@ import os
|
|
import shutil
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
import requests
|
|
from azure.core.exceptions import ClientAuthenticationError
|
|
from azure.identity._exceptions import CredentialUnavailableError
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-dbapi/tests/test_dbapi_trace.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-dbapi/tests/test_dbapi_trace.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-dbapi/tests/test_dbapi_trace.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.ext.dbapi import trace
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-django/tests/test_django_db_middleware.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-django/tests/test_django_db_middleware.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-django/tests/test_django_db_middleware.py
|
|
@@ -16,7 +16,10 @@ import unittest
|
|
from collections import namedtuple
|
|
|
|
import django
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
import pytest
|
|
from django.http import HttpResponse
|
|
from django.test.utils import teardown_test_environment
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-django/tests/test_django_middleware.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-django/tests/test_django_middleware.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-django/tests/test_django_middleware.py
|
|
@@ -16,7 +16,10 @@ import sys
|
|
import traceback
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
from django.http import HttpResponse
|
|
from django.test import RequestFactory
|
|
from django.test.utils import teardown_test_environment
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-flask/tests/test_flask_middleware.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-flask/tests/test_flask_middleware.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-flask/tests/test_flask_middleware.py
|
|
@@ -18,7 +18,10 @@
|
|
import unittest
|
|
|
|
import flask
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
from google.rpc import code_pb2
|
|
from werkzeug.exceptions import NotFound
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-google-cloud-clientlibs/tests/test_google_cloud_clientlibs_trace.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-google-cloud-clientlibs/tests/test_google_cloud_clientlibs_trace.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-google-cloud-clientlibs/tests/test_google_cloud_clientlibs_trace.py
|
|
@@ -15,7 +15,10 @@
|
|
import unittest
|
|
|
|
import grpc
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.ext.google_cloud_clientlibs import trace
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-grpc/tests/test_client_interceptor.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-grpc/tests/test_client_interceptor.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-grpc/tests/test_client_interceptor.py
|
|
@@ -17,7 +17,10 @@ import threading
|
|
import unittest
|
|
|
|
import grpc
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
from google.api_core import bidi
|
|
from google.protobuf import proto_builder
|
|
from grpc.framework.foundation import logging_pool
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-grpc/tests/test_server_interceptor.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-grpc/tests/test_server_interceptor.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-grpc/tests/test_server_interceptor.py
|
|
@@ -15,7 +15,10 @@
|
|
import unittest
|
|
|
|
import grpc
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
from google.rpc import code_pb2
|
|
|
|
from opencensus.ext.grpc import server_interceptor
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-httplib/tests/test_httplib_trace.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-httplib/tests/test_httplib_trace.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-httplib/tests/test_httplib_trace.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.ext.httplib import trace
|
|
from opencensus.trace import span as span_module
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-jaeger/tests/test_jaeger_exporter.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-jaeger/tests/test_jaeger_exporter.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-jaeger/tests/test_jaeger_exporter.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.ext.jaeger import trace_exporter
|
|
from opencensus.ext.jaeger.trace_exporter.gen.jaeger import jaeger
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-mysql/tests/test_mysql_trace.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-mysql/tests/test_mysql_trace.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-mysql/tests/test_mysql_trace.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.ext.mysql import trace
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-ocagent/tests/test_stats_exporter.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-ocagent/tests/test_stats_exporter.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-ocagent/tests/test_stats_exporter.py
|
|
@@ -21,7 +21,10 @@ from concurrent import futures
|
|
from datetime import datetime
|
|
|
|
import grpc
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
from google.protobuf import timestamp_pb2
|
|
|
|
from opencensus.common import resource, utils
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-ocagent/tests/test_trace_exporter.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-ocagent/tests/test_trace_exporter.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-ocagent/tests/test_trace_exporter.py
|
|
@@ -18,7 +18,10 @@ import socket
|
|
import unittest
|
|
|
|
import grpc
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.common.version import __version__
|
|
from opencensus.ext.ocagent.trace_exporter import TraceExporter
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-postgresql/tests/test_postgresql_trace.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-postgresql/tests/test_postgresql_trace.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-postgresql/tests/test_postgresql_trace.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.ext.postgresql import trace
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-prometheus/tests/test_prometheus_stats.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-prometheus/tests/test_prometheus_stats.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-prometheus/tests/test_prometheus_stats.py
|
|
@@ -15,7 +15,10 @@
|
|
import unittest
|
|
from datetime import datetime
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
from prometheus_client.core import Sample
|
|
|
|
from opencensus.ext.prometheus import stats_exporter as prometheus
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-pymongo/tests/test_pymongo_trace.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-pymongo/tests/test_pymongo_trace.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-pymongo/tests/test_pymongo_trace.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.ext.pymongo import trace
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-pymysql/tests/test_pymysql_trace.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-pymysql/tests/test_pymysql_trace.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-pymysql/tests/test_pymysql_trace.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.ext.pymysql import trace
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-pyramid/tests/test_pyramid_config.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-pyramid/tests/test_pyramid_config.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-pyramid/tests/test_pyramid_config.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.ext.pyramid import config
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-pyramid/tests/test_pyramid_middleware.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-pyramid/tests/test_pyramid_middleware.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-pyramid/tests/test_pyramid_middleware.py
|
|
@@ -17,7 +17,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
from pyramid.registry import Registry
|
|
from pyramid.response import Response
|
|
from pyramid.testing import DummyRequest
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-requests/tests/test_requests_trace.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-requests/tests/test_requests_trace.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-requests/tests/test_requests_trace.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
import requests
|
|
|
|
from opencensus.ext.requests import trace
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-sqlalchemy/tests/test_sqlalchemy_trace.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-sqlalchemy/tests/test_sqlalchemy_trace.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-sqlalchemy/tests/test_sqlalchemy_trace.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.ext.sqlalchemy import trace
|
|
from opencensus.trace import span as span_module
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-stackdriver/tests/test_stackdriver_exporter.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-stackdriver/tests/test_stackdriver_exporter.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-stackdriver/tests/test_stackdriver_exporter.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.common.version import __version__
|
|
from opencensus.ext.stackdriver import trace_exporter
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-stackdriver/tests/test_stackdriver_stats.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-stackdriver/tests/test_stackdriver_stats.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-stackdriver/tests/test_stackdriver_stats.py
|
|
@@ -16,7 +16,10 @@ import unittest
|
|
from datetime import datetime, timedelta
|
|
|
|
import google.auth
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
from google.api import metric_pb2
|
|
from google.cloud import monitoring_v3
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-threading/tests/test_threading_trace.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-threading/tests/test_threading_trace.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-threading/tests/test_threading_trace.py
|
|
@@ -17,7 +17,10 @@ import unittest
|
|
from concurrent.futures import ThreadPoolExecutor
|
|
from multiprocessing.pool import Pool
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.ext.threading import trace
|
|
from opencensus.trace import execution_context, tracer
|
|
Index: opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-zipkin/tests/test_zipkin_exporter.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/contrib/opencensus-ext-zipkin/tests/test_zipkin_exporter.py
|
|
+++ opencensus-python-0.11.4-1.1.14/contrib/opencensus-ext-zipkin/tests/test_zipkin_exporter.py
|
|
@@ -15,7 +15,10 @@
|
|
import unittest
|
|
from datetime import datetime
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.ext.zipkin import trace_exporter
|
|
from opencensus.trace import span_context
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/system/stats/stackdriver/stackdriver_stats_test.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/system/stats/stackdriver/stackdriver_stats_test.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/system/stats/stackdriver/stackdriver_stats_test.py
|
|
@@ -17,7 +17,10 @@ import random
|
|
import sys
|
|
import time
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
from google.cloud import monitoring_v3
|
|
|
|
from opencensus.ext.stackdriver import stats_exporter as stackdriver
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/common/monitored_resource_util/test_aws_identity_doc_utils.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/common/monitored_resource_util/test_aws_identity_doc_utils.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/common/monitored_resource_util/test_aws_identity_doc_utils.py
|
|
@@ -15,7 +15,10 @@
|
|
import json
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.common.monitored_resource import aws_identity_doc_utils
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/common/monitored_resource_util/test_gcp_metadata_config.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/common/monitored_resource_util/test_gcp_metadata_config.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/common/monitored_resource_util/test_gcp_metadata_config.py
|
|
@@ -15,7 +15,10 @@
|
|
import os
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.common.monitored_resource import gcp_metadata_config
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/common/monitored_resource_util/test_k8s_utils.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/common/monitored_resource_util/test_k8s_utils.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/common/monitored_resource_util/test_k8s_utils.py
|
|
@@ -15,7 +15,10 @@
|
|
import os
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.common.monitored_resource import k8s_utils
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/common/monitored_resource_util/test_monitored_resource.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/common/monitored_resource_util/test_monitored_resource.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/common/monitored_resource_util/test_monitored_resource.py
|
|
@@ -16,7 +16,10 @@ import os
|
|
import sys
|
|
from contextlib import contextmanager
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.common.monitored_resource import monitored_resource
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/common/test_http_handler.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/common/test_http_handler.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/common/test_http_handler.py
|
|
@@ -16,7 +16,10 @@ import json
|
|
import socket
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.common.http_handler import get_request
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/common/test_resource.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/common/test_resource.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/common/test_resource.py
|
|
@@ -17,7 +17,10 @@
|
|
import os
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.common import resource as resource_module
|
|
from opencensus.common.resource import Resource
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/common/test_utils.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/common/test_utils.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/common/test_utils.py
|
|
@@ -29,7 +29,10 @@ import gc
|
|
import unittest
|
|
import weakref
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.common import utils
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/common/transports/test_async.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/common/transports/test_async.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/common/transports/test_async.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.common.transports import async_
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/common/transports/test_sync.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/common/transports/test_sync.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/common/transports/test_sync.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.common.transports import sync
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/log/test_log.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/log/test_log.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/log/test_log.py
|
|
@@ -16,7 +16,10 @@ import logging
|
|
import sys
|
|
from contextlib import contextmanager
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus import log
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/metrics/export/test_cumulative.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/metrics/export/test_cumulative.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/metrics/export/test_cumulative.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-from mock import Mock
|
|
+try:
|
|
+ from unittest.mock import Mock
|
|
+except ImportError:
|
|
+ from mock import Mock
|
|
|
|
from opencensus.metrics.export import cumulative, gauge, metric_descriptor
|
|
from opencensus.metrics.export import value as value_module
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/metrics/export/test_gauge.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/metrics/export/test_gauge.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/metrics/export/test_gauge.py
|
|
@@ -15,7 +15,10 @@
|
|
import gc
|
|
import unittest
|
|
|
|
-from mock import Mock
|
|
+try:
|
|
+ from unittest.mock import Mock
|
|
+except ImportError:
|
|
+ from mock import Mock
|
|
|
|
from opencensus.metrics.export import gauge, metric_descriptor
|
|
from opencensus.metrics.export import value as value_module
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/metrics/test_transport.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/metrics/test_transport.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/metrics/test_transport.py
|
|
@@ -16,7 +16,10 @@ import gc
|
|
import sys
|
|
import time
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.metrics import transport
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_aggregation_data.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/stats/test_aggregation_data.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_aggregation_data.py
|
|
@@ -16,7 +16,10 @@ import time
|
|
import unittest
|
|
from datetime import datetime
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.metrics.export import point
|
|
from opencensus.metrics.export import value as value_module
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_aggregation.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/stats/test_aggregation.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_aggregation.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.metrics.export import value
|
|
from opencensus.stats import aggregation as aggregation_module
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_base_stats.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/stats/test_base_stats.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_base_stats.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.stats import base_exporter
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_measurement_map.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/stats/test_measurement_map.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_measurement_map.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.stats import measurement_map as measurement_map_module
|
|
from opencensus.tags import Tag, TagContext, TagMap
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_measure_to_view_map.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/stats/test_measure_to_view_map.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_measure_to_view_map.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.stats import measure_to_view_map as measure_to_view_map_module
|
|
from opencensus.stats.aggregation import CountAggregation
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_metric_utils.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/stats/test_metric_utils.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_metric_utils.py
|
|
@@ -15,7 +15,10 @@
|
|
import datetime
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.metrics.export import metric_descriptor, point, value
|
|
from opencensus.stats import (
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_stats_recorder.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/stats/test_stats_recorder.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_stats_recorder.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.stats import execution_context
|
|
from opencensus.stats import stats_recorder as stats_recorder_module
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_view_data.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/stats/test_view_data.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_view_data.py
|
|
@@ -15,7 +15,10 @@
|
|
import unittest
|
|
from datetime import datetime
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.common import utils
|
|
from opencensus.stats import aggregation as aggregation_module
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_view_manager.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/stats/test_view_manager.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_view_manager.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.stats import execution_context
|
|
from opencensus.stats import view_manager as view_manager_module
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_view.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/stats/test_view.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/stats/test_view.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.metrics.export import metric_descriptor
|
|
from opencensus.stats import aggregation, measure
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/exporters/test_logging_exporter.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/exporters/test_logging_exporter.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/exporters/test_logging_exporter.py
|
|
@@ -15,7 +15,10 @@
|
|
import logging
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.trace import logging_exporter, span_context
|
|
from opencensus.trace import span_data as span_data_module
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/propagation/test_b3_format.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/propagation/test_b3_format.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/propagation/test_b3_format.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.trace.propagation import b3_format
|
|
from opencensus.trace.span_context import INVALID_SPAN_ID
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/propagation/test_binary_format.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/propagation/test_binary_format.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/propagation/test_binary_format.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.trace.propagation import binary_format
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/propagation/test_text_format.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/propagation/test_text_format.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/propagation/test_text_format.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.trace.propagation import text_format
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/samplers/test_always_off.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/samplers/test_always_off.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/samplers/test_always_off.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
|
|
class TestAlwaysOffSampler(unittest.TestCase):
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/samplers/test_always_on.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/samplers/test_always_on.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/samplers/test_always_on.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
|
|
class TestAlwaysOnSampler(unittest.TestCase):
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/samplers/test_base_sampler.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/samplers/test_base_sampler.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/samplers/test_base_sampler.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
|
|
class TestBaseSampler(unittest.TestCase):
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/samplers/test_probability.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/samplers/test_probability.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/samplers/test_probability.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.trace import samplers
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_attributes.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/test_attributes.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_attributes.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.trace import attributes as attributes_module
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_base_span.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/test_base_span.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_base_span.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.trace.base_span import BaseSpan
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_blank_span.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/test_blank_span.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_blank_span.py
|
|
@@ -15,7 +15,10 @@
|
|
import datetime
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.common import utils
|
|
from opencensus.trace.link import Link
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_config_integration.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/test_config_integration.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_config_integration.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.trace import config_integration
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_execution_context.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/test_execution_context.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_execution_context.py
|
|
@@ -15,7 +15,10 @@
|
|
import threading
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.trace import execution_context
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_ext_utils.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/test_ext_utils.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_ext_utils.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
from google.rpc import code_pb2
|
|
|
|
from opencensus.trace import utils
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_link.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/test_link.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_link.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.trace import link as link_module
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_span.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/test_span.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_span.py
|
|
@@ -16,7 +16,10 @@ import datetime
|
|
import unittest
|
|
from collections import OrderedDict
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
from google.rpc import code_pb2
|
|
|
|
from opencensus.common import utils
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_stack_trace.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/test_stack_trace.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_stack_trace.py
|
|
@@ -15,7 +15,10 @@
|
|
import sys
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.trace import stack_trace as stack_trace_module
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_time_event.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/test_time_event.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_time_event.py
|
|
@@ -15,7 +15,10 @@
|
|
import unittest
|
|
from datetime import datetime
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.trace import time_event as time_event_module
|
|
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_tracer.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/test_tracer.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/test_tracer.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.trace import samplers, span_data
|
|
from opencensus.trace import tracer as tracer_module
|
|
Index: opencensus-python-0.11.4-1.1.14/tests/unit/trace/tracers/test_context_tracer.py
|
|
===================================================================
|
|
--- opencensus-python-0.11.4-1.1.14.orig/tests/unit/trace/tracers/test_context_tracer.py
|
|
+++ opencensus-python-0.11.4-1.1.14/tests/unit/trace/tracers/test_context_tracer.py
|
|
@@ -14,7 +14,10 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
from opencensus.trace import execution_context, span
|
|
from opencensus.trace.tracers import context_tracer
|