Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Shotgun Python API Changelog

Here you can see the full list of changes between each Python API release.

v3.0.37
=====================

- Proper support added for unicode and utf-8 string paths given to upload methods, and a sane error is raised when an unusable string encoding is used.
- Adds support for querying preferences from Shotgun via the new preferences_read method.

v3.0.36
=====================

Expand Down
18 changes: 18 additions & 0 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,23 @@ def test_upload_download(self):

# Make sure that non-utf-8 encoded paths raise when they can't be
# converted to utf-8.
#
# We need to touch the file we're going to test with first. We can't
# bundle a file with this filename in the repo due to some pip install
# problems on Windows. Note that the path below is utf-8 encoding of
# what we'll eventually encode as shift-jis.
file_path_s = os.path.join(this_dir, "./\xe3\x81\x94.shift-jis")
file_path_u = file_path_s.decode("utf-8")
if sys.platform.startswith("win"):
fh = open(file_path_u, "w")
else:
fh = open(file_path_s, "w")

try:
fh.write("This is just a test file with some random data in it.")
finally:
fh.close()

u_path = os.path.abspath(
os.path.expanduser(
glob.glob(os.path.join(unicode(this_dir), u'*.shift-jis'))[0]
Expand All @@ -278,6 +295,7 @@ def test_upload_download(self):

# cleanup
os.remove(file_path)
os.remove(u_path)

def test_upload_thumbnail_in_create(self):
"""Upload a thumbnail via the create method"""
Expand Down
Binary file removed tests/ご.shift-jis
Binary file not shown.