Message59139
| Author | gvanrossum |
|---|---|
| Recipients | christian.heimes, gvanrossum, kbk |
| Date | 2008-01-03.17:57:43 |
| SpamBayes Score | 0.0050418647 |
| Marked as misclassified | No |
| Message-id | <1199383063.52.0.353941222409.issue1567@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
I see. I think there's still something uncomfortable with this function though -- it looks in sys.modules, but if it doesn't find it there, it invokes the full-blown import machinery, which calls the (possibly overridden) __import__ builtin, which in turn might do a relative import (at least in 2.6) or any amount of funny business. The only thing that really worries me here is the possibility of relative import. I'm thinking that relative import is really never meant to be when called from C, so perhaps it would be sufficient to modify the call to __import__ at the end of PyImport_Import() to add a 5th parameter, zero, to always force absolute import. A quick concept test shows that this doesn't break anything, though it is worth checking the docs. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008-01-03 17:57:43 | gvanrossum | set | spambayes_score: 0.00504186 -> 0.0050418647 recipients: + gvanrossum, kbk, christian.heimes |
| 2008-01-03 17:57:43 | gvanrossum | set | spambayes_score: 0.00504186 -> 0.00504186 messageid: <1199383063.52.0.353941222409.issue1567@psf.upfronthosting.co.za> |
| 2008-01-03 17:57:43 | gvanrossum | link | issue1567 messages |
| 2008-01-03 17:57:43 | gvanrossum | create | |