From b78271f9022741885a4e2794235d3d09a86d61f6 Mon Sep 17 00:00:00 2001 From: Martin Samson Date: Tue, 14 Jun 2016 09:33:59 -0400 Subject: [PATCH 1/2] Bump version number --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 85e1972..a188c17 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='tc_core', - version='0.3.0', + version='0.4.0', url='http://github.com/thumbor_community/core', license='MIT', author='Thumbor Community', From ad6be8b6d5ba91264fdfac6cd18fdabd970fa23f Mon Sep 17 00:00:00 2001 From: Martin Samson Date: Thu, 20 Apr 2017 13:51:50 -0400 Subject: [PATCH 2/2] Support tornado <=4.4 and >= 4.5 --- setup.py | 6 +++--- tc_core/__init__.py | 2 +- tc_core/app.py | 2 +- tc_core/context.py | 2 +- tc_core/context_importer.py | 2 +- tc_core/importer.py | 2 +- tc_core/web.py | 11 +++++++---- vows/__init__.py | 2 +- vows/app_vows.py | 2 +- vows/context_importer_vows.py | 2 +- vows/extension_vows.py | 2 +- vows/request_parser_vows.py | 2 +- 12 files changed, 20 insertions(+), 17 deletions(-) diff --git a/setup.py b/setup.py index a188c17..e7812ab 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='tc_core', - version='0.4.0', + version='0.4.1', url='http://github.com/thumbor_community/core', license='MIT', author='Thumbor Community', @@ -15,8 +15,8 @@ zip_safe=False, platforms='any', install_requires=[ - 'libthumbor>=1.3.2', - 'thumbor>=5.0.6', + 'libthumbor>=1.3.0', + 'thumbor>=5.0', ], extras_require={ 'tests': [ diff --git a/tc_core/__init__.py b/tc_core/__init__.py index 13e5768..6a8c653 100644 --- a/tc_core/__init__.py +++ b/tc_core/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2015, thumbor-community +# Copyright (c) 2017, thumbor-community # Use of this source code is governed by the MIT license that can be # found in the LICENSE file. diff --git a/tc_core/app.py b/tc_core/app.py index a402be9..c03206a 100644 --- a/tc_core/app.py +++ b/tc_core/app.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2015, thumbor-community +# Copyright (c) 2017, thumbor-community # Use of this source code is governed by the MIT license that can be # found in the LICENSE file. diff --git a/tc_core/context.py b/tc_core/context.py index 26d9fbf..3326987 100644 --- a/tc_core/context.py +++ b/tc_core/context.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2015, thumbor-community +# Copyright (c) 2017, thumbor-community # Use of this source code is governed by the MIT license that can be # found in the LICENSE file. diff --git a/tc_core/context_importer.py b/tc_core/context_importer.py index 6829ee2..ff31899 100644 --- a/tc_core/context_importer.py +++ b/tc_core/context_importer.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2015, thumbor-community +# Copyright (c) 2017, thumbor-community # Use of this source code is governed by the MIT license that can be # found in the LICENSE file. diff --git a/tc_core/importer.py b/tc_core/importer.py index 4cbbe84..49c6552 100644 --- a/tc_core/importer.py +++ b/tc_core/importer.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2015, thumbor-community +# Copyright (c) 2017, thumbor-community # Use of this source code is governed by the MIT license that can be # found in the LICENSE file. diff --git a/tc_core/web.py b/tc_core/web.py index 9a72561..295499e 100644 --- a/tc_core/web.py +++ b/tc_core/web.py @@ -1,14 +1,17 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2015, thumbor-community +# Copyright (c) 2017, thumbor-community # Use of this source code is governed by the MIT license that can be # found in the LICENSE file. import re - from libthumbor.url import Url import tornado.web +if hasattr(tornado.web, '_unquote_or_none'): + from tornado.web import _unquote_or_none +else: + from tornado.routing import _unquote_or_none class RequestParser(object): @@ -34,11 +37,11 @@ def path_to_parameters(cls, path): # or groupdict but not both. if cls._url_regex.groupindex: parameters = dict( - (str(k), tornado.web._unquote_or_none(v)) + (str(k), _unquote_or_none(v)) for (k, v) in match.groupdict().items()) else: parameters = [ - tornado.web._unquote_or_none(s) + _unquote_or_none(s) for s in match.groups() ] else: diff --git a/vows/__init__.py b/vows/__init__.py index c816ad0..9423f56 100644 --- a/vows/__init__.py +++ b/vows/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2015, thumbor-community +# Copyright (c) 2017, thumbor-community # Use of this source code is governed by the MIT license that can be # found in the LICENSE file. diff --git a/vows/app_vows.py b/vows/app_vows.py index c7be48d..3144784 100644 --- a/vows/app_vows.py +++ b/vows/app_vows.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2015, thumbor-community +# Copyright (c) 2017, thumbor-community # Use of this source code is governed by the MIT license that can be # found in the LICENSE file. diff --git a/vows/context_importer_vows.py b/vows/context_importer_vows.py index be04185..c5906b7 100644 --- a/vows/context_importer_vows.py +++ b/vows/context_importer_vows.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2015, thumbor-community +# Copyright (c) 2017, thumbor-community # Use of this source code is governed by the MIT license that can be # found in the LICENSE file. diff --git a/vows/extension_vows.py b/vows/extension_vows.py index f7132c5..45f0c14 100644 --- a/vows/extension_vows.py +++ b/vows/extension_vows.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2015, thumbor-community +# Copyright (c) 2017, thumbor-community # Use of this source code is governed by the MIT license that can be # found in the LICENSE file. diff --git a/vows/request_parser_vows.py b/vows/request_parser_vows.py index d98c04d..469e08f 100644 --- a/vows/request_parser_vows.py +++ b/vows/request_parser_vows.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2015, thumbor-community +# Copyright (c) 2017, thumbor-community # Use of this source code is governed by the MIT license that can be # found in the LICENSE file.