There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
__import__ and packages aren't mixing well
File contents follow: note that doing "import y" instead of "import" changes the result.
a = 1
y = __import__('y')
a = 2
The issue here is what we pass in in the default case. If you do:
y == __import__('y', globals(), locals())
then we both have the same behavior. But for just __import__('y') we still have enough information to figure out the calling module and do the import relative to that.
Fixing this involves changing our import code to look at the dictionary instead of our ICallerContext object. Because of the complexity of this change I'm moving this back to 1.1.