Skip to content

Commit 0d30241

Browse files
authored
Merge branch 'master' into ivana/toxgen/again
2 parents 0d0ca56 + b2238ca commit 0d30241

File tree

5 files changed

+32
-23
lines changed

5 files changed

+32
-23
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## 2.26.1
4+
5+
### Various fixes & improvements
6+
7+
- fix(threading): Data leak in ThreadingIntegration between threads (#4281) by @antonpirker
8+
- fix(logging): Clarify separate warnings case is for Python <3.11 (#4296) by @szokeasaurusrex
9+
- fix(logging): Add formatted message to log events (#4292) by @szokeasaurusrex
10+
- fix(logging): Send raw logging parameters (#4291) by @szokeasaurusrex
11+
- fix: Revert "chore: Deprecate `same_process_as_parent` (#4244)" (#4290) by @sentrivana
12+
313
## 2.26.0
414

515
### Various fixes & improvements

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
copyright = "2019-{}, Sentry Team and Contributors".format(datetime.now().year)
3232
author = "Sentry Team and Contributors"
3333

34-
release = "2.26.0"
34+
release = "2.26.1"
3535
version = ".".join(release.split(".")[:2]) # The short X.Y version.
3636

3737

sentry_sdk/consts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,4 +966,4 @@ def _get_default_options():
966966
del _get_default_options
967967

968968

969-
VERSION = "2.26.0"
969+
VERSION = "2.26.1"

sentry_sdk/integrations/logging.py

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import sys
23
from datetime import datetime, timezone
34
from fnmatch import fnmatch
45

@@ -248,27 +249,25 @@ def _emit(self, record):
248249
event["level"] = level # type: ignore[typeddict-item]
249250
event["logger"] = record.name
250251

251-
# Log records from `warnings` module as separate issues
252-
record_captured_from_warnings_module = (
253-
record.name == "py.warnings" and record.msg == "%s"
254-
)
255-
if record_captured_from_warnings_module:
256-
# use the actual message and not "%s" as the message
257-
# this prevents grouping all warnings under one "%s" issue
258-
msg = record.args[0] # type: ignore
259-
260-
event["logentry"] = {
261-
"message": msg,
262-
"formatted": record.getMessage(),
263-
"params": (),
264-
}
265-
252+
if (
253+
sys.version_info < (3, 11)
254+
and record.name == "py.warnings"
255+
and record.msg == "%s"
256+
):
257+
# warnings module on Python 3.10 and below sets record.msg to "%s"
258+
# and record.args[0] to the actual warning message.
259+
# This was fixed in https://github.com/python/cpython/pull/30975.
260+
message = record.args[0]
261+
params = ()
266262
else:
267-
event["logentry"] = {
268-
"formatted": record.getMessage(),
269-
"message": to_string(record.msg),
270-
"params": record.args,
271-
}
263+
message = record.msg
264+
params = record.args
265+
266+
event["logentry"] = {
267+
"message": to_string(message),
268+
"formatted": record.getMessage(),
269+
"params": params,
270+
}
272271

273272
event["extra"] = self._extra_from_record(record)
274273

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def get_file_text(file_name):
2121

2222
setup(
2323
name="sentry-sdk",
24-
version="2.26.0",
24+
version="2.26.1",
2525
author="Sentry Team and Contributors",
2626
author_email="[email protected]",
2727
url="https://github.com/getsentry/sentry-python",

0 commit comments

Comments
 (0)