Commit e7630ac
committed
Use the runsource method of interpreter object in bpython.args.exec_code().
__future__ imports affect the compilation of subsequent code. The interpreter
object's compile method keeps track of which __future__ imports it has
already seen, while the built-in compile function doesn't.
Closes bpython#369.1 parent ffa49f0 commit e7630ac
2 files changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | 102 | | |
104 | 103 | | |
105 | 104 | | |
| |||
0 commit comments