Comment 6 for bug 399106

Revision history for this message
Joe Coffey (joe-coffey) wrote : Re: [Bug 399106] [NEW] from future import ...

That is what I was afraid of... This is probably insurmountable for us. (we
have a pretty involved bootstrat importing system which requires the
absolute_import. I'm not entirely sure why, but there it is...)

Thanks for your help.

On Tue, Jul 14, 2009 at 7:07 PM, Gael Varoquaux <
<email address hidden>> wrote:

> On Tue, Jul 14, 2009 at 07:43:29PM -0000, Joe Coffey wrote:
> > Thanks for your quick reply. However, this didn't fix it for me:
>
> > Basically if I have a file tester.py of the form:
>
> > from future import division, absolute_import
>
> > print "hi"
>
> Ha, OK. Sorry, I hadn't understood your problem.
>
> Sorry, I cannot fix this: the problem is that you cannot do imports from
> __future__ unless you are right at the entry point. In other word, you
> have to comment out or to try/except these lines. I can't fix this, and
> you won't be able to run these files in another program, say an IDE. It
> is a limitation of Python.
>
> Gaël
>
> --
> from future import ...
> https://bugs.launchpad.net/bugs/399106
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in pyreport: generate reports out of python scripts: New
>
> Bug description:
> Pyreport seems like a great piece of software. Unfortunately a fair amount
> of my groups modules are loaded by an importer that prepends:
>
> from __future__ import division, absolute_import
>
> before the module. This seems to make using pyreport impossible. Is there
> anyway out? Removing from future import from the modules isn't an option. I
> don't have control over the codebase.
>