Skip to content

Commit 45b44b7

Browse files
committed
[Setup] use utf-8 explicitly in setup.py
1 parent b14c089 commit 45b44b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22

33
import sys
4+
import io
45
import re
56
import warnings
67
try:
@@ -10,7 +11,7 @@
1011
from distutils.core import setup
1112
has_setuptools = False
1213

13-
src = open('jsonpatch.py').read()
14+
src = io.open('jsonpatch.py', encoding='utf-8').read()
1415
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", src))
1516
docstrings = re.findall('"""([^"]*)"""', src, re.MULTILINE | re.DOTALL)
1617

0 commit comments

Comments
 (0)