Author brett.cannon
Recipients RazerM, SamueleSanti, brett.cannon, eric.snow, ncoghlan, serhiy.storchaka
Date 2017-07-04.17:00:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1499187659.87.0.701287228043.issue30814@psf.upfronthosting.co.za>
In-reply-to
Content
My guess is the import of package has completed but package.submodule hasn't (I don't know what state it would be in, but obviously before the module is assigned as an attribute on the package), a context switch occurs, and then the assignment fails due to package.submodule not being set on package yet.

I wonder if package.submodule is in sys.modules when the AttributeError is triggered? I don't remember when the assignment of a submodule to an attriute on a package occurs, but this suggests it's rather late and that's why this is failing. Maybe the assignment is outside of the per-module lock being released and that is what's causing this?

Hey, at least importing in a thread doesn't deadlock anymore like it used to. ;)
History
Date User Action Args
2017-07-04 17:00:59brett.cannonsetrecipients: + brett.cannon, ncoghlan, eric.snow, serhiy.storchaka, RazerM, SamueleSanti
2017-07-04 17:00:59brett.cannonsetmessageid: <1499187659.87.0.701287228043.issue30814@psf.upfronthosting.co.za>
2017-07-04 17:00:59brett.cannonlinkissue30814 messages
2017-07-04 17:00:59brett.cannoncreate