From 8e3f810f7ff97e9350b5f2d80c8751e0ee6f0b1b Mon Sep 17 00:00:00 2001 From: Alessandro Molina Date: Wed, 14 Nov 2018 22:01:44 +0100 Subject: [PATCH 1/2] Address incompatible change in transaction manager --- .travis.yml | 2 -- tg/appwrappers/transaction_manager.py | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index fbf7bf18..67f76ce2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: python python: - - "2.6" - "2.7" - - "3.3" - "3.4" - "3.5" - "3.6" diff --git a/tg/appwrappers/transaction_manager.py b/tg/appwrappers/transaction_manager.py index 0255a49f..cc4b9035 100644 --- a/tg/appwrappers/transaction_manager.py +++ b/tg/appwrappers/transaction_manager.py @@ -97,7 +97,10 @@ def __call__(self, controller, environ, context): exc_info = sys.exc_info() log.debug('Error while running request, aborting transaction') try: - can_retry = transaction_manager._retryable(*exc_info[:-1]) + try: + can_retry = txn.isRetryableError(exc_info[1]) + except AttributeError: + can_retry = transaction_manager._retryable(*exc_info[:-1]) txn.abort() if (attempts_left <= 0) or (not can_retry): reraise(*exc_info) From 5b2bc68d7f6ff247e79c8630b0a12a5a86dbec49 Mon Sep 17 00:00:00 2001 From: Alessandro Molina Date: Wed, 14 Nov 2018 22:08:05 +0100 Subject: [PATCH 2/2] Twek travis --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 67f76ce2..434ab16c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ python: - "pypy" install: + - "pip install --upgrade pip" - "pip install --upgrade setuptools" - "travis_retry pip install git+git://github.com/TurboGears/crank.git" - "travis_retry pip install git+git://github.com/TurboGears/backlash.git" @@ -14,7 +15,7 @@ install: - "pip install repoze.who" - "pip install coverage==4.2" - "pip install nose" - - "pip install --no-use-wheel -e .[testing]" + - "pip install --no-binary :all: -e .[testing]" - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install git+git://github.com/TurboGears/tgext.chameleon_genshi.git; fi - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install git+git://github.com/TurboGears/tgext.chameleon_genshi.git; fi