Hi devs, Happily there's ihooks.py that does 99% of work (and a bit more).
Please see ticket and applied patch: http://code.djangoproject.com/ticket/8413 Working for me on windows and linux. Also one can use the patch to track wrong imports, and it might be useful to add warn() to tell people they are doing wrong thing and that might have unpleasant consequences for them: # It's recommended to fix django to never reach this place # and remove this except case, see http://bugs.python.org/issue2090 # and related django bugs: #6587 and #6579 # XXX: Turn it on to catch empty-name module imports. # print 'Importing empty module with __import__:', m.__name__ I'm not sure if the patch can be in 1.0: some more testing required, and problem is not very important. But, well, it can be mentioned in release notes :) On Mon, Aug 18, 2008 at 6:28 AM, Steve Holden <[EMAIL PROTECTED]> wrote: > Not only that, but the Python import system is a maze of twisty little > passages, all alike. Overloading __import__ isn't as straightforward as > it might casually appear. -- Best regards, Yuri V. Baburov, ICQ# 99934676, Skype: yuri.baburov, MSN: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
