Issue1057835
Created on 2004年10月31日 20:20 by felixwiemann, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files |
| File name |
Uploaded |
Description |
Edit |
|
t2.diff
|
mwh,
2004年11月01日 13:33
|
simple fix |
| Messages (9) |
|
msg22953 - (view) |
Author: Felix Wiemann (felixwiemann) |
Date: 2004年10月31日 20:20 |
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 *'.
|
|
msg22954 - (view) |
Author: Michael Hudson (mwh) (Python committer) |
Date: 2004年11月01日 11:41 |
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...
|
|
msg22955 - (view) |
Author: Felix Wiemann (felixwiemann) |
Date: 2004年11月01日 13:03 |
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.
|
|
msg22956 - (view) |
Author: Michael Hudson (mwh) (Python committer) |
Date: 2004年11月01日 13:33 |
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 :)
|
|
msg22957 - (view) |
Author: Thenault Sylvain (syt) |
Date: 2004年11月02日 09:25 |
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.
|
|
msg22958 - (view) |
Author: Felix Wiemann (felixwiemann) |
Date: 2004年11月02日 10:44 |
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
|
|
msg22959 - (view) |
Author: Michael Hudson (mwh) (Python committer) |
Date: 2004年11月02日 13:50 |
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 :-)
|
|
msg22960 - (view) |
Author: Jeremy Hylton (jhylton) (Python triager) |
Date: 2004年11月07日 03:04 |
Logged In: YES
user_id=31392
This looks fine.
|
|
msg22961 - (view) |
Author: Michael Hudson (mwh) (Python committer) |
Date: 2004年11月08日 12:18 |
Logged In: YES
user_id=6656
Fixed in revision 1.49 of Lib/compiler/transformer.py.
Thanks for the review.
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2022年04月11日 14:56:07 | admin | set | github: 41109 |
| 2004年10月31日 20:20:32 | felixwiemann | create |