aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Cannon <brcan@microsoft.com>2019-12-06 11:15:03 -0800
committerBrett Cannon <brcan@microsoft.com>2019-12-06 11:15:03 -0800
commitb98d77c546835aeded413cd7048e503f0158f387 (patch)
treece001c73cd7e162afc6c66ec9ee826c8a44bc88f
parent6ef7577baf8a99539d4c2e3965c4797c6ea5d318 (diff)
downloaduritemplates-b98d77c546835aeded413cd7048e503f0158f387.tar.gz
Appease Python 2.7
-rw-r--r--setup.py2
-rw-r--r--tests/test_from_fixtures.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index d51c902..dd0a391 100644
--- a/setup.py
+++ b/setup.py
@@ -1,3 +1,5 @@
+from io import open
+
from setuptools import setup
from uritemplate import __version__
diff --git a/tests/test_from_fixtures.py b/tests/test_from_fixtures.py
index 4b92081..d6c9810 100644
--- a/tests/test_from_fixtures.py
+++ b/tests/test_from_fixtures.py
@@ -1,3 +1,4 @@
+import io
import json
import os.path
@@ -12,7 +13,7 @@ def fixture_file_path(filename):
def load_examples(filename):
path = fixture_file_path(filename)
- with open(path, 'r', encoding="utf-8") as examples_file:
+ with io.open(path, 'r', encoding="utf-8") as examples_file:
examples = json.load(examples_file)
return examples