10000 Fixes #72 · Lukasa/github3.py@2d7ffed · GitHub
[go: up one dir, main page]

Skip to content

Commit 2d7ffed

Browse files
committed
Release 0.5.2
1 parent cef0aeb commit 2d7ffed

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
History/Changelog
22
=================
33

4+
0.5.2: 2013-03-02
5+
-----------------
6+
7+
- Stop trying to decode the byte strings returned by ``b64decode``. Fixes #72
8+
49
0.5.1: 2013-02-21
510
-----------------
611

github3/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
__author__ = 'Ian Cordasco'
1414
__license__ = 'Modified BSD'
1515
__copyright__ = 'Copyright 2012-2013 Ian Cordasco'
16-
__version__ = '0.5.1'
16+
__version__ = '0.5.2'
1717

1818
from github3.api import *
1919
from github3.github import GitHub, GitHubEnterprise, GitHubStatus

github3/repos.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,10 +1350,16 @@ def __init__(self, content):
13501350
#: Base64-encoded content of the file.
13511351
self.content = content.get('content', '')
13521352

1353-
#: Decoded content of the file.
1353+
#: Decoded content of the file as a bytes object. If we try to decode
1354+
#: to character set for you, we might encounter an exception which
1355+
#: will prevent the object from being created. On python2 this is the
1356+
#: same as a string, but on python3 you should call the decode method
1357+
#: with the character set you wish to use, e.g.,
1358+
#: ``content.decoded.decode('utf-8')``.
1359+
#: .. versionchanged:: 0.5.2
13541360
self.decoded = self.content
13551361
if self.encoding == 'base64':
1356-
self.decoded = b64decode(self.content.encode()).decode()
1362+
self.decoded = b64decode(self.content.encode())
13571363

13581364
# file name, path, and size
13591365
#: Name of the content.

0 commit comments

Comments
 (0)
0