diff --git a/.gitignore b/.gitignore index c289fa2..22ba304 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /sentry-python-1.25.1.tar.gz /sentry-python-1.26.0.tar.gz /sentry-python-1.27.0.tar.gz +/sentry-python-1.28.0.tar.gz diff --git a/0001-tests-add-support-for-Python-3.12.patch b/0001-tests-add-support-for-Python-3.12.patch new file mode 100644 index 0000000..38e17d1 --- /dev/null +++ b/0001-tests-add-support-for-Python-3.12.patch @@ -0,0 +1,80 @@ +From 5b6ab04064d1512497592e461354e9d94e5f7d04 Mon Sep 17 00:00:00 2001 +From: Roman Inflianskas +Date: Thu, 13 Jul 2023 11:08:43 +0300 +Subject: [PATCH] tests: add support for Python 3.12 + +--- + tests/integrations/logging/test_logging.py | 13 ++++++++++++- + tests/test_scrubber.py | 3 +++ + 2 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/tests/integrations/logging/test_logging.py b/tests/integrations/logging/test_logging.py +index de1c55e2..f0edef58 100644 +--- a/tests/integrations/logging/test_logging.py ++++ b/tests/integrations/logging/test_logging.py +@@ -3,6 +3,7 @@ import sys + + import pytest + import logging ++import platform + import warnings + + from sentry_sdk.integrations.logging import LoggingIntegration, ignore_logger +@@ -61,9 +62,15 @@ def test_logging_extra_data(sentry_init, capture_events): + (event,) = events + + assert event["level"] == "fatal" ++ if platform.python_version_tuple() >= ("3", "12"): ++ assert event["extra"].pop("taskName") == None + assert event["extra"] == {"bar": 69} ++ data = { ++ "foo": 42, ++ **({"taskName": None} if platform.python_version_tuple() >= ("3", "12") else {}) ++ } + assert any( +- crumb["message"] == "bread" and crumb["data"] == {"foo": 42} ++ crumb["message"] == "bread" and crumb["data"] == data + for crumb in event["breadcrumbs"]["values"] + ) + +@@ -76,6 +83,8 @@ def test_logging_extra_data_integer_keys(sentry_init, capture_events): + + (event,) = events + ++ if platform.python_version_tuple() >= ("3", "12"): ++ assert event["extra"].pop("taskName") == None + assert event["extra"] == {"1": 1} + + +@@ -184,6 +193,8 @@ def test_logging_captured_warnings(sentry_init, capture_events, recwarn): + ) + events = capture_events() + ++ warnings.filterwarnings("ignore", category=DeprecationWarning) ++ + logging.captureWarnings(True) + warnings.warn("first") + warnings.warn("second") +diff --git a/tests/test_scrubber.py b/tests/test_scrubber.py +index 4b2dfff4..9b05e4c9 100644 +--- a/tests/test_scrubber.py ++++ b/tests/test_scrubber.py +@@ -1,5 +1,6 @@ + import sys + import logging ++import platform + + from sentry_sdk import capture_exception, capture_event, start_transaction, start_span + from sentry_sdk.utils import event_from_exception +@@ -100,6 +101,8 @@ def test_breadcrumb_extra_scrubbing(sentry_init, capture_events): + assert event["extra"]["bar"] == 69 + assert event["extra"]["auth"] == "[Filtered]" + ++ if platform.python_version_tuple() >= ("3", "12"): ++ assert event["breadcrumbs"]["values"][0]["data"].pop("taskName") == None + assert event["breadcrumbs"]["values"][0]["data"] == { + "foo": 42, + "password": "[Filtered]", +-- +2.41.0 + diff --git a/python-sentry-sdk.spec b/python-sentry-sdk.spec index c677a30..f486abc 100644 --- a/python-sentry-sdk.spec +++ b/python-sentry-sdk.spec @@ -1,11 +1,12 @@ Name: python-sentry-sdk -Version: 1.27.0 -Release: 2%{?dist} +Version: 1.28.0 +Release: 1%{?dist} Summary: The new Python SDK for Sentry.io License: MIT URL: https://sentry.io/for/python/ Source0: https://github.com/getsentry/sentry-python/archive/%{version}/sentry-python-%{version}.tar.gz +Patch0: 0001-tests-add-support-for-Python-3.12.patch BuildArch: noarch BuildRequires: python3-devel @@ -144,7 +145,7 @@ sed -i '/content_type=/D' tests/integrations/starlette/test_starlette.py # 6. bottle, django, and flask integration tests (werkzeug in Fedora 38 is too new, see: https://github.com/getsentry/sentry-python/issues/1398) # 7. celery & newrelic test (newrelic is unpackaged yet) # 8. test_auto_enabling_integrations_catches_import_error: testing suite relies on the test to be executed on clean env -%pytest --asyncio-mode=auto --durations=5 \ +%pytest --durations=5 \ --deselect tests/integrations/asyncio/test_asyncio_py3.py \ --deselect tests/integrations/celery/test_celery.py::test_newrelic_interference \ --deselect tests/integrations/requests/test_requests.py::test_crumb_capture \ @@ -173,6 +174,10 @@ sed -i '/content_type=/D' tests/integrations/starlette/test_starlette.py %changelog +* Thu Jul 13 2023 Roman Inflianskas - 1.28.0-1 +- Update to 1.28.0 (fedora#2220929) +- Tests: add support for Python 3.12 (fedora#2220496) + * Thu Jul 13 2023 Python Maint - 1.27.0-2 - Rebuilt for Python 3.12 diff --git a/sources b/sources index 63cbe13..41dc2c8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sentry-python-1.27.0.tar.gz) = 45317295fc71f2a2965ba65552cd6b0fd5f48ae95e1ed06a288d61cfab96cd05d5316cef08f7a90599c1ba57d24022a610fe1bfb9c98ff2a0853f2fc8921c8e7 +SHA512 (sentry-python-1.28.0.tar.gz) = 83ceecbf89f197c03b0a402508c677eed4c6adb36ff826579513f79dd36c666e47267c7b6e8f4eced91fc12b18a0de3c1a24c89c6fe6e77c603ace535612542c