Skip to content

Commit f97c949

Browse files
committed
Merge branch 'master' into sentry-sdk-2.0
2 parents 7b062ee + 2eeb8c5 commit f97c949

File tree

21 files changed

+247
-5
lines changed

21 files changed

+247
-5
lines changed

CHANGELOG.md

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

3+
## 1.40.5
4+
5+
### Various fixes & improvements
6+
7+
- Deprecate `last_event_id()`. (#2749) by @antonpirker
8+
- Warn if uWSGI is set up without proper thread support (#2738) by @sentrivana
9+
10+
uWSGI has to be run in threaded mode for the SDK to run properly. If this is
11+
not the case, the consequences could range from features not working unexpectedly
12+
to uWSGI workers crashing.
13+
14+
Please make sure to run uWSGI with both `--enable-threads` and `--py-call-uwsgi-fork-hooks`.
15+
16+
- `parsed_url` can be `None` (#2734) by @sentrivana
17+
- Python 3.7 is not supported anymore by Lambda, so removed it and added 3.12 (#2729) by @antonpirker
18+
319
## 1.40.4
420

521
### Various fixes & improvements

checkouts/data-schemas

docs/conf.py

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

31-
release = "1.40.4"
31+
release = "1.40.5"
3232
version = ".".join(release.split(".")[:2]) # The short X.Y version.
3333

3434

sentry_sdk/consts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,4 +326,4 @@ def _get_default_options():
326326
del _get_default_options
327327

328328

329-
VERSION = "1.40.4"
329+
VERSION = "1.40.5"

sentry_sdk/integrations/clickhouse_driver.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ def setup_once() -> None:
5959
clickhouse_driver.client.Client.receive_end_of_query = _wrap_end(
6060
clickhouse_driver.client.Client.receive_end_of_query
6161
)
62+
if hasattr(clickhouse_driver.client.Client, "receive_end_of_insert_query"):
63+
# In 0.2.7, insert queries are handled separately via `receive_end_of_insert_query`
64+
clickhouse_driver.client.Client.receive_end_of_insert_query = _wrap_end(
65+
clickhouse_driver.client.Client.receive_end_of_insert_query
66+
)
6267
clickhouse_driver.client.Client.receive_result = _wrap_end(
6368
clickhouse_driver.client.Client.receive_result
6469
)

sentry_sdk/tracing_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from sentry_sdk.consts import OP, SPANDATA
1313
from sentry_sdk.utils import (
1414
capture_internal_exceptions,
15+
filename_for_module,
1516
Dsn,
1617
logger,
1718
match_regex_list,
@@ -250,7 +251,9 @@ def add_query_source(hub, span):
250251
except Exception:
251252
filepath = None
252253
if filepath is not None:
253-
if project_root is not None and filepath.startswith(project_root):
254+
if namespace is not None and not PY2:
255+
in_app_path = filename_for_module(namespace, filepath)
256+
elif project_root is not None and filepath.startswith(project_root):
254257
in_app_path = filepath.replace(project_root, "").lstrip(os.sep)
255258
else:
256259
in_app_path = filepath

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="1.40.4",
24+
version="1.40.5",
2525
author="Sentry Team and Contributors",
2626
author_email="hello@sentry.io",
2727
url="https://github.com/getsentry/sentry-python",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
import os
2+
import sys
13
import pytest
24

35
pytest.importorskip("asyncpg")
46
pytest.importorskip("pytest_asyncio")
7+
8+
# Load `asyncpg_helpers` into the module search path to test query source path names relative to module. See
9+
# `test_query_source_with_module_in_search_path`
10+
sys.path.insert(0, os.path.join(os.path.dirname(__file__)))

tests/integrations/asyncpg/asyncpg_helpers/__init__.py

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
async def execute_query_in_connection(query, connection):
2+
await connection.execute(query)

0 commit comments

Comments
 (0)