This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kristjan.jonsson
Recipients Pascal.Chambon, barry, brett.cannon, eric.snow, isoschiz, kristjan.jonsson, methane, ncoghlan, pconnell, pje
Date 2013-06-05.16:07:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1370448446.13.0.874645486784.issue17636@psf.upfronthosting.co.za>
In-reply-to
Content
Interesting.
And I can report that it works, in 2.7, with code such as
b = importlib.import_module("..b", __name__)
and
a = importlib.import_module("..a", __name__)

Still, it seems odd that a whole "importlib" is requried ot resolve the relative import, and that it doesn"t work with __import__, given how "supposedly" the import statement is supposed to translate to a __import__ call internally.  One would think that __import__ had access to the relative path machinery somehow.
History
Date User Action Args
2013-06-05 16:07:26kristjan.jonssonsetrecipients: + kristjan.jonsson, barry, brett.cannon, pje, ncoghlan, methane, eric.snow, pconnell, isoschiz, Pascal.Chambon
2013-06-05 16:07:26kristjan.jonssonsetmessageid: <1370448446.13.0.874645486784.issue17636@psf.upfronthosting.co.za>
2013-06-05 16:07:26kristjan.jonssonlinkissue17636 messages
2013-06-05 16:07:25kristjan.jonssoncreate