diff --git a/python-sentry-sdk.changes b/python-sentry-sdk.changes index 5f165f2..3792938 100644 --- a/python-sentry-sdk.changes +++ b/python-sentry-sdk.changes @@ -1,3 +1,32 @@ +------------------------------------------------------------------- +Fri Oct 3 08:42:53 UTC 2025 - Markéta Machová + +- Update to 2.39.0 + * Fix incompatibility with new Strawberry version + * Add failed_request_status_codes to Litestar + * The enable_tracing option is now deprecated. Please use traces_sample_rate instead + * Add Statsig integration + * Fix(asyncio): Improve asyncio integration error handling + * Fix memory leak by not piling up breadcrumbs forever in Spark workers + * New Beta Feature Enable Sentry logs in logging Integration + * Change CODEOWNERS back to Python SDK owners + * Deprecate set_measurement() API + * Allow configuring keep_alive via environment variable + * Sentry logs for Loguru + * Fix CI, adapt to new redis-py release + * Add support for openai-agents + * Add top-level start- and end session methods + * Use span.data instead of measurements for token usage + * Considerably raise DEFAULT_MAX_VALUE_LENGTH + * The OpenAIIntegration now supports OpenAI Responses API + * The data captured will also show up in the new AI Agents Dashboard + * Langchain and Anthropic Integration now support the Sentry AI dashboard + * Add the unraisable exception integration + * Add support for langgraph + * Many more fixes and improvements, see upstream changelog + * Note: This is my last release. So long, and thanks for all the fish! by @antonpirker +- Add upstream release.patch to fix failing test + ------------------------------------------------------------------- Fri Jan 24 18:35:13 UTC 2025 - ecsos diff --git a/python-sentry-sdk.spec b/python-sentry-sdk.spec index 217f5c5..1b47a27 100644 --- a/python-sentry-sdk.spec +++ b/python-sentry-sdk.spec @@ -1,7 +1,7 @@ # # spec file for package python-sentry-sdk # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,12 +19,14 @@ # nothing provides python2-venusian >= 1.0 needed by python2-pyramid %{?sle15_python_module_pythons} Name: python-sentry-sdk -Version: 2.20.0 +Version: 2.39.0 Release: 0 Summary: Python SDK for Sentry.io License: BSD-2-Clause URL: https://github.com/getsentry/sentry-python Source0: https://github.com/getsentry/sentry-python/archive/%{version}/sentry-python-%{version}.tar.gz +# PATCH-FIX-UPSTREAM https://github.com/getsentry/sentry-python/pull/4879 fix(tests): Don't assume release is set +Patch: release.patch BuildRequires: %{python_module Django >= 2.0} BuildRequires: %{python_module Flask >= 1.0} BuildRequires: %{python_module MarkupSafe} @@ -160,17 +162,8 @@ export PYTEST_ADDOPTS="-W ignore::DeprecationWarning" export DJANGO_SETTINGS_MODULE=tests.conftest # do not test integration (many package are missing at SUSE): rm -r tests/integrations -# test_auto_enabling_integrations_catches_import_error asert False where False = ..., not sure IGNORED_CHECKS="(test_default_release and test_utils)" -IGNORED_CHECKS="${IGNORED_CHECKS} or test_new_scopes_compat_event" -IGNORED_CHECKS="${IGNORED_CHECKS} or test_transport_works" -IGNORED_CHECKS="${IGNORED_CHECKS} or test_auto_enabling_integrations_catches_import_error" -IGNORED_CHECKS="${IGNORED_CHECKS} or test_socks_proxy or test_utils" -# https://github.com/getsentry/sentry-python/issues/3624 -IGNORED_CHECKS="${IGNORED_CHECKS} or test_redis_disabled_when_not_installed" -# Related to this report gh#getsentry/sentry-python#576, looks like it -# freeze also with python 3.13 -IGNORED_CHECKS="${IGNORED_CHECKS} or eventlet or greenlet" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_socks_proxy or test_datetime_from_isoformat" %pytest -rs -k "not (${IGNORED_CHECKS})" %files %{python_files} diff --git a/release.patch b/release.patch new file mode 100644 index 0000000..7909c49 --- /dev/null +++ b/release.patch @@ -0,0 +1,48 @@ +From f3e8a5ccd0a341cf139f474856163f0e5335741c Mon Sep 17 00:00:00 2001 +From: Ivana Kellyer +Date: Fri, 3 Oct 2025 08:40:35 +0200 +Subject: [PATCH] fix(tests): Don't assume release is set (#4879) + +### Description +Even though we try to figure out the current release automatically if +it's not provided, it can still end up being `None`. If that's the case, +it won't be attached to logs. The `test_logs_attributes` test assumes +there always is a release, which is incorrect. + +I opted for conditionally checking for `sentry.release` in the test +instead of removing the check altogether, even though the test itself is +supposed to test custom user provided attributes. The reason is that +there is no other generic logs test testing `sentry.release`. + +#### Issues +Closes https://github.com/getsentry/sentry-python/issues/4878 + +#### Reminders +- Please add tests to validate your changes, and lint your code using +`tox -e linters`. +- Add GH Issue ID _&_ Linear ID (if applicable) +- PR title should use [conventional +commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type) +style (`feat:`, `fix:`, `ref:`, `meta:`) +- For external contributors: +[CONTRIBUTING.md](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md), +[Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord +community](https://discord.gg/Ww9hbqr) +--- + tests/test_logs.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tests/test_logs.py b/tests/test_logs.py +index 596a31922e..1e252c5bfb 100644 +--- a/tests/test_logs.py ++++ b/tests/test_logs.py +@@ -230,7 +230,8 @@ def test_logs_attributes(sentry_init, capture_envelopes): + for k, v in attrs.items(): + assert logs[0]["attributes"][k] == v + assert logs[0]["attributes"]["sentry.environment"] == "production" +- assert "sentry.release" in logs[0]["attributes"] ++ if sentry_sdk.get_client().options.get("release") is not None: ++ assert "sentry.release" in logs[0]["attributes"] + assert logs[0]["attributes"]["sentry.message.parameter.my_var"] == "some value" + assert logs[0]["attributes"][SPANDATA.SERVER_ADDRESS] == "test-server" + assert logs[0]["attributes"]["sentry.sdk.name"].startswith("sentry.python") diff --git a/sentry-python-2.20.0.tar.gz b/sentry-python-2.20.0.tar.gz deleted file mode 100644 index 3c29ee7..0000000 --- a/sentry-python-2.20.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fdd3ca2d0db684d315ad07e5e5f023fb9565df0407ab6770a2ee05ceb2e840fb -size 597011 diff --git a/sentry-python-2.39.0.tar.gz b/sentry-python-2.39.0.tar.gz new file mode 100644 index 0000000..e952384 --- /dev/null +++ b/sentry-python-2.39.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c21d07e1d1f1dbba3887678f3711e43987bfc30c12e5e42a4c1db443bd8fbc50 +size 746737