Skip to content

Commit

Permalink
Merge pull request #17 from thumbor-community/fix-tornado-deprecation
Browse files Browse the repository at this point in the history
Fix tornado deprecation
  • Loading branch information
masom authored Apr 20, 2017
2 parents 326ea81 + ad6be8b commit f4021b6
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 17 deletions.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='tc_core',
version='0.3.0',
version='0.4.1',
url='http://github.com/thumbor_community/core',
license='MIT',
author='Thumbor Community',
Expand All @@ -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': [
Expand Down
2 changes: 1 addition & 1 deletion tc_core/__init__.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion tc_core/app.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion tc_core/context.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion tc_core/context_importer.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion tc_core/importer.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
11 changes: 7 additions & 4 deletions tc_core/web.py
Original file line number Diff line number Diff line change
@@ -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):

Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion vows/__init__.py
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion vows/app_vows.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion vows/context_importer_vows.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion vows/extension_vows.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion vows/request_parser_vows.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down

0 comments on commit f4021b6

Please sign in to comment.