From 3b1fc4fd3c0175d230c2ba0ae540be97dcc7f04c Mon Sep 17 00:00:00 2001 From: Deivis Laya Date: Sat, 3 Jun 2023 00:32:11 +0000 Subject: [PATCH] [FIX] sentry: downgrade sentry-sdk to compatible version Odoo requires urllib3 == 1.26.5 https://github.com/Vauxoo/odoo/blob/e0feda462961ae612cacc36d1a75d56c5594fd22/requirements.txt#L56 sentry-sdk > 1.9.0 required urllib3 >= 1.26.11 https://github.com/getsentry/sentry-python/blob/4f1f782fbedc9adcf1dfcd2092bb328443f09e8c/setup.py#L43 Currently, urllib3 >= 1.26.11 is causing the following error in response.py: ``` Traceback (most recent call last): "/home/odoo/.local/lib/python3.8/site-packages/urllib3/response.py", line 705, in _error_catcher yield File "/home/odoo/.local/lib/python3.8/site-packages/urllib3/response.py", line 830, in _raw_read raise IncompleteRead(self._fp_bytes_read, self.length_remaining) urllib3.exceptions.IncompleteRead: IncompleteRead(1501 bytes read, -827 more expected) ``` On the other hand, sentry 1.9.0 supports urllib3 >= 1.10.0, satisfying odoo requirements. This partially reverts https://github.com/OCA/server-tools/commit/d7ae024951d30b9409104d0bf294f8e1cf05064f. That was initially introduced to support newer versions of `sentry_sdk`, but won't be required anymore due to this downgrade. --- requirements.txt | 2 +- sentry/__manifest__.py | 2 +- sentry/const.py | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 59a5bf929..20317e5b6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,4 +6,4 @@ odoorpc openpyxl openupgradelib pygount -sentry_sdk>=1.17.0 +sentry_sdk<=1.9.0 diff --git a/sentry/__manifest__.py b/sentry/__manifest__.py index 06a35e342..b22ac7980 100644 --- a/sentry/__manifest__.py +++ b/sentry/__manifest__.py @@ -17,7 +17,7 @@ "installable": True, "external_dependencies": { "python": [ - "sentry_sdk>=1.17.0", + "sentry_sdk<=1.9.0", ] }, "depends": [ diff --git a/sentry/const.py b/sentry/const.py index 3e1bce287..c3135a9df 100644 --- a/sentry/const.py +++ b/sentry/const.py @@ -77,9 +77,7 @@ 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( - "include_local_variables", DEFAULT_OPTIONS["include_local_variables"], None - ), + SentryOption("with_locals", DEFAULT_OPTIONS["with_locals"], None), SentryOption( "max_breadcrumbs", DEFAULT_OPTIONS["max_breadcrumbs"], to_int_if_defined ),