Skip to content

Commit bad1ac6

Browse files
committed
Fix PY3 encoding of parameters for OAuth flow.
1 parent ac8c886 commit bad1ac6

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
# built documents.
6060
#
6161
# The short X.Y version.
62-
version = '5.2'
62+
version = '5.2.1'
6363
# The full version, including alpha/beta/rc tags.
64-
release = '5.2'
64+
release = '5.2.1'
6565

6666
# The language for content autogenerated by Sphinx. Refer to documentation
6767
# for a list of supported languages.

dropbox/dropbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
]
66

77
# TODO(kelkabany): We need to auto populate this as done in the v1 SDK.
8-
__version__ = '5.2'
8+
__version__ = '5.2.1'
99

1010
import contextlib
1111
import json

dropbox/oauth.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,9 +436,13 @@ def _params_to_urlencoded(params):
436436
the exception of unicode objects which are utf8-encoded.
437437
"""
438438
def encode(o):
439-
if isinstance(o, six.text_type):
440-
return o.encode('utf8')
439+
if isinstance(o, six.binary_type):
440+
return o
441441
else:
442-
return str(o)
442+
if isinstance(o, six.text_type):
443+
return o.encode('utf-8')
444+
else:
445+
return str(o).encode('utf-8')
446+
443447
utf8_params = {encode(k): encode(v) for k, v in six.iteritems(params)}
444448
return url_encode(utf8_params)

dropbox/rest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
else:
3232
url_encode = urllib.urlencode
3333

34-
SDK_VERSION = "5.2"
34+
SDK_VERSION = "5.2.1"
3535

3636
TRUSTED_CERT_FILE = pkg_resources.resource_filename(__name__, 'trusted-certs.crt')
3737

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
dist = setup(
2727
name='dropbox',
28-
version='5.2',
28+
version='5.2.1',
2929
description='Official Dropbox API Client',
3030
author='Dropbox',
3131
author_email='[email protected]',

0 commit comments

Comments
 (0)