This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author marfire
Recipients benjamin.peterson, marfire, maubp
Date 2014-09-22.03:09:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1411355357.23.0.431533993391.issue19111@psf.upfronthosting.co.za>
In-reply-to
Content
I'm interested in working on this, but it's not clear to me if this has been accepted as a bug. I converted a large project recently and was shocked to find that all 100+ files were broken because of the needless "from future_builtins..." line. Perversely, this most hurts those who made the most effort to make their code forward-compatible with Python 3.

One complication is that you can't simply substitute a blank line, since that could produce invalid code if the import is inside a try/except block. (This doesn't affect "from __future__..." since that can only be at the start of a file.) Substituting a "pass" should work fine though. That would be a bit unsightly, but then again so is the blank line at the start of the file produced by removing "from __future__...". More important is to produce code that actually works under Python 3.

Another issue is that it's possible to simply "import future_builtins" and then use, for example, "future_builtins.zip(...)". So trying to fix that usage as well would be (I assume) a lot more complicated. Personally it seems fine with me to just fix the "from __future_builtins__..." usage.
History
Date User Action Args
2014-09-22 03:09:17marfiresetrecipients: + marfire, benjamin.peterson, maubp
2014-09-22 03:09:17marfiresetmessageid: <1411355357.23.0.431533993391.issue19111@psf.upfronthosting.co.za>
2014-09-22 03:09:17marfirelinkissue19111 messages
2014-09-22 03:09:16marfirecreate