Message100006
| Author |
meador.inge |
| Recipients |
Oren_Held, brett.cannon, gangesmaster, meador.inge |
| Date |
2010年02月24日.05:27:30 |
| SpamBayes Score |
7.0905604e-10 |
| Marked as misclassified |
No |
| Message-id |
<1266989259.23.0.209426460271.issue7902@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> So doing the import manually through __import__('os', globals(),
> locals(), ['walk'], 1) does not work.
I get the same behavior for this reproduction case regardless of whether I use:
import .os import walk
or:
__import__('os', globals(), locals(), ['walk'], 1)
The bug is reproducible in the trunk.
I think the problem has to do with 'import_module_level' incorrectly doing an absolute lookup for 'os' when the relative lookup in 'foo' fails. I have attached a patch with the relevant fix and test case. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年02月24日 05:27:39 | meador.inge | set | recipients:
+ meador.inge, brett.cannon, gangesmaster, Oren_Held |
| 2010年02月24日 05:27:39 | meador.inge | set | messageid: <1266989259.23.0.209426460271.issue7902@psf.upfronthosting.co.za> |
| 2010年02月24日 05:27:36 | meador.inge | link | issue7902 messages |
| 2010年02月24日 05:27:35 | meador.inge | create |
|