Author SamueleSanti
Recipients SamueleSanti
Date 2017-06-30.11:09:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za>
In-reply-to
Content
I noticed this weird behavior in Python 3.6:

Apparently ``import package.module as _alias`` fails in a threaded environment, sometimes raising an ``ImportError``, seemingly at random.

Everything seems to be working perfectly fine:

- On 3.5 and lower
- When *not* defining an alias, eg. ``import package.module``
- When using the ``from package import module as alias`` style


See this repo with code for reproducing the issue:

https://github.com/rshk/python36-import-alias-concurrency-bug


I tested this on the system Python 3.6.1 shipped with Archlinux (both inside and outside of a virtualenv), and in the official docker image for 3.6.

This all started here https://github.com/psycopg/psycopg2/issues/550 as others were experiencing this issue too.
History
Date User Action Args
2017-06-30 11:09:48SamueleSantisetrecipients: + SamueleSanti
2017-06-30 11:09:48SamueleSantisetmessageid: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za>
2017-06-30 11:09:48SamueleSantilinkissue30814 messages
2017-06-30 11:09:47SamueleSanticreate