Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d39f13a

Browse files
committedFeb 13, 2025··
[FIX] sentry: Fix DeprecationWarning for sentry_sdk.push_scope
See: https://docs.sentry.io/platforms/python/migration/1.x-to-2.x\#scope-pushing
1 parent 3c75646 commit d39f13a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎sentry/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"installable": True,
1818
"external_dependencies": {
1919
"python": [
20-
"sentry_sdk<=1.9.0",
20+
"sentry_sdk",
2121
]
2222
},
2323
"depends": [

‎sentry/hooks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def initialize_sentry(config):
142142
# Patch the wsgi server in case of further registration
143143
odoo.http.Application = SentryWsgiMiddleware(odoo.http.Application)
144144

145-
with sentry_sdk.push_scope() as scope:
145+
with sentry_sdk.new_scope() as scope:
146146
scope.set_extra("debug", False)
147147
sentry_sdk.capture_message("Starting Odoo Server", "info")
148148

0 commit comments

Comments
 (0)
Please sign in to comment.