[ python-Bugs-1057835 ] compiler.transformer, "from module import *"
SourceForge.net
noreply at sourceforge.net
Sun Nov 7 04:04:32 CET 2004
Bugs item #1057835, was opened at 2004-10-31 20:20
Message generated for change (Comment added) made by jhylton
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1057835&group_id=5470
Category: Parser/Compiler
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Felix Wiemann (felixwiemann)
Assigned to: Jeremy Hylton (jhylton)
Summary: compiler.transformer, "from module import *"
Initial Comment:
import compiler.transformer
compiler.transformer.parse('from module import
*').getChildNodes()[0].getChildNodes()[0].lineno
... is 1 in Python 2.3 but None in Python 2.4b1.
lineno is 1 in Python 2.4 too when passing 'from module
import something' instead of 'from module import *'.
----------------------------------------------------------------------
>Comment By: Jeremy Hylton (jhylton)
Date: 2004-11-07 03:04
Message:
Logged In: YES
user_id=31392
This looks fine.
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2004-11-02 13:50
Message:
Logged In: YES
user_id=6656
Jeremy said in the issue that he'd changed things, so this
isn't a total surprise. We're in b2 freeze now, so Jeremy
has until that is over to comment or I'll check this in :-)
----------------------------------------------------------------------
Comment By: Felix Wiemann (felixwiemann)
Date: 2004-11-02 10:44
Message:
Logged In: YES
user_id=1014490
In fact, it does seem to be unrelated to the patch itself.
Instead, the missing lineno attribute is due to the
differences between rev. 1.44 with the patch applied and
rev. 1.45. I.e., transformer.py was modified after applying
the patch but before checking it in.
URL of the patch:
http://sourceforge.net/tracker/download.php?group_id=5470&atid=305470&file_id=99117&aid=1015989
----------------------------------------------------------------------
Comment By: Thenault Sylvain (syt)
Date: 2004-11-02 09:25
Message:
Logged In: YES
user_id=387525
this doesn't seems to be related to the patch #101598 (i'm
the author of this patch). Using python 2.3, I get 1 as
lineno with or without the patch applied.
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2004-11-01 13:33
Message:
Logged In: YES
user_id=6656
Hmm, consider the attached. It fixes the immediate issue,
and doesn't seem to break test_compiler. I'd commit it, but
it's so obvious that I'm wondering why Jeremy didn't do this
in the first place: either I'm missing something a little
subtle, or Jeremy missed something really obvious :)
----------------------------------------------------------------------
Comment By: Felix Wiemann (felixwiemann)
Date: 2004-11-01 13:03
Message:
Logged In: YES
user_id=1014490
I neither have time nor knowledge to fix it, but it seems
that the error was introduced in rev. 1.45 of
transformer.py. The author of rev. 1.45 is jhylton,
applying patch #1015989. Assigned this bug to him.
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2004-11-01 11:41
Message:
Logged In: YES
user_id=6656
I would guess that this is the result of the relatively recent
changes to allow multiple line imports, but I don't really have time
to play with this right now. Do you have time to work on a fix?
If it does prove to be the multiple line import thing, you might
want to pester Dima Dorfman -- I think that was his patch...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1057835&group_id=5470
More information about the Python-bugs-list
mailing list