[issue27387] Thread hangs on str.encode() when locale is not set

2020-11-30 Thread Irit Katriel
Irit Katriel added the comment: Python 2 issue. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue27387] Thread hangs on str.encode() when locale is not set

2020-11-06 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue27387] Thread hangs on str.encode() when locale is not set

2016-06-27 Thread R. David Murray
R. David Murray added the comment: No, I'm talking about the threading docs, not the encoding docs. I think that's the only place it matters. Specifically, in the section that I linked to, in the bullet point that warns against launching threads on import, it can note that even if you try to

[issue27387] Thread hangs on str.encode() when locale is not set

2016-06-27 Thread STINNER Victor
STINNER Victor added the comment: > 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? Ok to add a note to str.encode and str.decode methods to explain that an import is needed the first time that an encoding i

[issue27387] Thread hangs on str.encode() when locale is not set

2016-06-27 Thread Brett Cannon
Brett Cannon added the comment: Adding a note to the docs sounds reasonable. -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue27387] Thread hangs on str.encode() when locale is not set

2016-06-26 Thread R. David Murray
R. David Murray added the comment: This situation is warned about explicitly in the threading docs (https://docs.python.org/2/library/threading.html#importing-in-threaded-code). The import deadlock is fixed in python3, but it is still a really bad idea to launch threads on module import. Wha

[issue27387] Thread hangs on str.encode() when locale is not set

2016-06-26 Thread STINNER Victor
STINNER Victor added the comment: It is a deadlock on the import lock. You should avoid creating and waiting for a thread when a module is imported. Defer the creation of the thread. -- ___ Python tracker _

[issue27387] Thread hangs on str.encode() when locale is not set

2016-06-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue27387] Thread hangs on str.encode() when locale is not set

2016-06-25 Thread Josh Purvis
New submission from Josh Purvis: This bug manifest itself in at least one very specific situation: 1. No locale is set on the machine 2. A file (test1.py) imports a second (test2.py) 3. The second file (test2.py) calls str.encode() from inside a thread 4. Running Python 2.7 [Env