impossible to execute a buffer with 'from future' imports
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-mode.el |
Fix Released
|
High
|
Andreas Roehler |
Bug Description
I guess it is a design limitation and reincarnation of
https:/
but since its message was concerned only with the line number, I decided to file a new one.
Trying to execute a buffer (C-c C-c, or explicit execute-
In [54]: File "/home/
from __future__ import with_statement
SyntaxError: from __future__ imports must occur at the beginning of the file
since that buffer's code gets "extended" with additional imports by python-mode.el ... not sure what has to be done (besides parsing out the code to be executed and moving future imports ahead ...?)
Changed in python-mode: | |
importance: | Undecided → Medium |
assignee: | nobody → Andreas Roehler (a-roehler) |
milestone: | none → 6.1.0 |
Changed in python-mode: | |
status: | New → Confirmed |
importance: | Medium → High |
Changed in python-mode: | |
status: | Confirmed → Fix Committed |
Changed in python-mode: | |
status: | Fix Committed → Fix Released |