We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32dbd35 commit 0a1a82fCopy full SHA for 0a1a82f
setup.py
@@ -43,7 +43,8 @@ def get_version(package):
43
"""
44
Return package version as listed in `__version__` in `init.py`.
45
46
- init_py = open(os.path.join(package, '__init__.py')).read()
+ with open(os.path.join(package, '__init__.py'), encoding='utf-8') as f:
47
+ init_py = f.read()
48
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
49
50
0 commit comments