Commit ec6acea
committed
Replace use of exec with runpy
`setup.py` uses `exec` to read the version number from the version file. It's generally considered best practice to avoid `exec` because of risks it carries. In this particular case, we can borrow the technique used in Cirq's `setup.py`, and use the Python `runpy` package.1 parent 7932f78 commit ec6acea
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
134 | | - | |
135 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| |||
0 commit comments