[issue8505] 2to3 fix_future.py removes __future__ imports, but should it?
report at bugs.python.org
Sat Apr 24 21:29:28 CEST 2010
Benjamin Peterson <benjamin at python.org> added the comment:
2010/4/24 Barry A. Warsaw <report at bugs.python.org>:
> Barry A. Warsaw <barry at python.org> added the comment:
> Removing __future__ as part of explicit command line execution of 2to3 makes some sense, but I wonder if 2to3 is used more often automatically (e.g. via Distribute) where it's at best unhelpful. 2to3 is all about making it easy to port code from Python 2 to 3, and this particular transformation makes it (albeit, slightly so) harder.
It's also designed to be easily customizable.
> A different idea would be to add a comment before the future import indicating its uselessness, but not removing it. OTOH, I would also be happy with a better way to just disable it in a setup.py (e.g. by passing the -x flag in somehow).
I'm not sure we should get into the habit of telling people that their
code is useless. :)
I'll just close this as won't fix.
title: 2to3 fix_future.py removes __future__ imports, but should it? -> 2to3 fix_future.py removes __future__ imports, but should it?
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list