Skip to content

Commit 57399ce

Browse files
committed
Parse _version contents instead of using exec()
1 parent 0cad346 commit 57399ce

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
def get_version():
2424
version_file = "src/PIL/_version.py"
2525
with open(version_file, encoding="utf-8") as f:
26-
exec(compile(f.read(), version_file, "exec"))
27-
return locals()["__version__"]
26+
return f.read().split('"')[1]
2827

2928

3029
configuration = {}

0 commit comments

Comments
 (0)