Skip to content

Commit bece971

Browse files
committed
Python 3 compatibility: use open(), not file()
1 parent 52a2fd0 commit bece971

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def ext_math(extName):
142142
# http://stackoverflow.com/questions/2058802/how-can-i-get-the-version-defined-in-setup-py-setuptools-in-my-package
143143
#
144144
import ast
145-
with file('wlsqm/__init__.py') as f:
145+
with open('wlsqm/__init__.py', 'r') as f:
146146
for line in f:
147147
if line.startswith('__version__'):
148148
version = ast.parse(line).body[0].value.s

0 commit comments

Comments
 (0)