diff --git a/mock.patch b/mock.patch new file mode 100644 index 0000000..0b008d3 --- /dev/null +++ b/mock.patch @@ -0,0 +1,63 @@ +Index: sentry-python-1.24.0/tests/tracing/test_decorator_py3.py +=================================================================== +--- sentry-python-1.24.0.orig/tests/tracing/test_decorator_py3.py ++++ sentry-python-1.24.0/tests/tracing/test_decorator_py3.py +@@ -1,4 +1,4 @@ +-import mock ++from unittest import mock + import pytest + import sys + +Index: sentry-python-1.24.0/tests/tracing/test_misc.py +=================================================================== +--- sentry-python-1.24.0.orig/tests/tracing/test_misc.py ++++ sentry-python-1.24.0/tests/tracing/test_misc.py +@@ -1,4 +1,4 @@ +-from mock import MagicMock ++from unittest.mock import MagicMock + import pytest + import gc + import uuid +Index: sentry-python-1.24.0/tests/test_api.py +=================================================================== +--- sentry-python-1.24.0.orig/tests/test_api.py ++++ sentry-python-1.24.0/tests/test_api.py +@@ -1,4 +1,4 @@ +-import mock ++from unittest import mock + + from sentry_sdk import ( + configure_scope, +Index: sentry-python-1.24.0/tests/test_client.py +=================================================================== +--- sentry-python-1.24.0.orig/tests/test_client.py ++++ sentry-python-1.24.0/tests/test_client.py +@@ -1,7 +1,7 @@ + # coding: utf-8 + import os + import json +-import mock ++from unittest import mock + import pytest + import subprocess + import sys +Index: sentry-python-1.24.0/tests/test_crons.py +=================================================================== +--- sentry-python-1.24.0.orig/tests/test_crons.py ++++ sentry-python-1.24.0/tests/test_crons.py +@@ -1,4 +1,4 @@ +-import mock ++from unittest import mock + import pytest + import uuid + +Index: sentry-python-1.24.0/tests/tracing/test_decorator_py2.py +=================================================================== +--- sentry-python-1.24.0.orig/tests/tracing/test_decorator_py2.py ++++ sentry-python-1.24.0/tests/tracing/test_decorator_py2.py +@@ -1,4 +1,4 @@ +-import mock ++from unittest import mock + + from sentry_sdk.tracing_utils_py2 import ( + start_child_span_decorator as start_child_span_decorator_py2, diff --git a/python-sentry-sdk.changes b/python-sentry-sdk.changes index c4e4483..977f872 100644 --- a/python-sentry-sdk.changes +++ b/python-sentry-sdk.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 29 13:31:22 UTC 2023 - Dirk Müller + +- add mock.patch to use mock from stdlib + ------------------------------------------------------------------- Tue May 23 10:39:34 UTC 2023 - ecsos diff --git a/python-sentry-sdk.spec b/python-sentry-sdk.spec index 24ecdff..3dbcdb1 100644 --- a/python-sentry-sdk.spec +++ b/python-sentry-sdk.spec @@ -28,6 +28,7 @@ License: BSD-2-Clause Group: Development/Languages/Python URL: https://github.com/getsentry/sentry-python Source0: https://github.com/getsentry/sentry-python/archive/%{version}/sentry-python-%{version}.tar.gz +Patch1: mock.patch BuildRequires: %{python_module Django >= 1.8} BuildRequires: %{python_module Flask >= 0.11} BuildRequires: %{python_module SQLAlchemy >= 1.2} @@ -55,7 +56,6 @@ BuildRequires: %{python_module eventlet} BuildRequires: %{python_module gevent} BuildRequires: %{python_module hypothesis} BuildRequires: %{python_module jsonschema >= 3.2.0} -BuildRequires: %{python_module mock} BuildRequires: %{python_module pyramid} BuildRequires: %{python_module pyrsistent >= 0.16.0} BuildRequires: %{python_module pytest-cov >= 2.8.1} @@ -115,7 +115,7 @@ A Python SDK for Sentry.io. https://sentry.io/for/python/ %prep -%setup -q -n sentry-python-%{version} +%autosetup -p1 -n sentry-python-%{version} %build %python_build