Brett Cannon added the comment:

OK, so the warning is triggered if __package is None or __spec__ is None 
 That's defined in _calc___package__() which is only called if index != 0 when 
calling __import__() 

So the question becomes how is Cython importing modules? This warning should 
only be triggered if you're attempting a relative import from within a package 
(and thus have a level > 0). Based on Antoine's Cython issue, since something 
like multidict isn't a package it would suggest either Cython is setting the 
level > 0 when it doesn't mean to or there's a bug somewhere with level == 0 
and yet Python is still trying to calculate the parent package for no reason.


Python tracker <>
Python-bugs-list mailing list

Reply via email to