From 3388fff4b9565ded626ee7eb90784bc9410f0a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 9 Oct 2022 13:15:41 +0200 Subject: [PATCH] Update minimal braintree version We need at least 3.38.0 to manage Dispute and have TooManyRequestsError. issue11734 review423961003 --- account.py | 8 +++++++- setup.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/account.py b/account.py index 63791ac626..62b7ab094f 100644 --- a/account.py +++ b/account.py @@ -5,10 +5,16 @@ import urllib import uuid import braintree -from braintree.exceptions import GatewayTimeoutError, TooManyRequestsError +from braintree.exceptions import TooManyRequestsError from braintree.exceptions.braintree_error import BraintreeError from sql import Literal +try: + from braintree.exceptions import GatewayTimeoutError +except ImportError: + class GatewayTimeoutError(Exception): + pass + from trytond.cache import Cache from trytond.config import config from trytond.i18n import gettext diff --git a/setup.py b/setup.py index 4f3c8ce3d5..feda6b0694 100755 --- a/setup.py +++ b/setup.py @@ -61,7 +61,7 @@ else: if local_version: version += '+' + '.'.join(local_version) -requires = ['braintree >= 3.24.0', 'werkzeug'] +requires = ['braintree >= 3.38.0', 'werkzeug'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): requires.append(get_require_version('trytond_%s' % dep))