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 r.david.murray
Recipients brett.cannon, docs@python, eric.snow, ezio.melotti, joshpurvis, ncoghlan, r.david.murray, vstinner
Date 2016-06-26.20:54:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This situation is warned about explicitly in the threading docs (  The import deadlock is fixed in python3, but it is still a really bad idea to launch threads on module import.

What isn't obvious, of course, is that calling encode for the first time for a given encoding does an implicit import of the relevant encoding.  I don't think encodings is the only stdlib module that does implicit imports, but it is probably the most used case.  Maybe it is worth adding a warning to that section of the 2.7 docs about implicit imports in general and encode/decode in particular?
Date User Action Args
2016-06-26 20:54:07r.david.murraysetrecipients: + r.david.murray, brett.cannon, ncoghlan, vstinner, ezio.melotti, docs@python, eric.snow, joshpurvis
2016-06-26 20:54:07r.david.murraysetmessageid: <>
2016-06-26 20:54:07r.david.murraylinkissue27387 messages
2016-06-26 20:54:06r.david.murraycreate