[FIX] sentry: change with_locals to include_local_variables variable

Currently, version 1.17.0 of sentry_sdk is causing the following error:

SentryOption("with_locals", DEFAULT_OPTIONS["with_locals"], None),
KeyError: 'with_locals'.

Where the with_locals key is not found in the dictionary, generating an
error, stopping the installation of the sentry module.

In version 1.17.0 rename 'with_locals'  to 'include_local_variables'
79e33169aa

This commit adjust the  get_sentry_options() method in
https://github.com/Vauxoo/server-tools/blob/16.0/sentry/const.py file, set the new variable.
pull/2588/head
Deivis Laya 2023-03-17 17:47:37 +00:00
parent 5e61b76927
commit d7ae024951
3 changed files with 5 additions and 3 deletions

View File

@ -4,4 +4,4 @@ dataclasses
mako
odoorpc
openupgradelib
sentry_sdk
sentry_sdk>=1.17.0

View File

@ -17,7 +17,7 @@
"installable": True,
"external_dependencies": {
"python": [
"sentry_sdk",
"sentry_sdk>=1.17.0",
]
},
"depends": [

View File

@ -77,7 +77,9 @@ def get_sentry_options():
SentryOption("dsn", "", str.strip),
SentryOption("transport", DEFAULT_OPTIONS["transport"], select_transport),
SentryOption("logging_level", DEFAULT_LOG_LEVEL, get_sentry_logging),
SentryOption("with_locals", DEFAULT_OPTIONS["with_locals"], None),
SentryOption(
"include_local_variables", DEFAULT_OPTIONS["include_local_variables"], None
),
SentryOption(
"max_breadcrumbs", DEFAULT_OPTIONS["max_breadcrumbs"], to_int_if_defined
),