[issue10923] Python 2.7 hangs on Unicode+threading

Piotr Maślanka report at bugs.python.org
Mon Jan 17 03:17:33 CET 2011


New submission from Piotr Maślanka <piotr.maslanka at henrietta.com.pl>:

Python 2.7.1(x86 MSI), binary downloaded from python.org, hangs quite reliably. Code:

with open(threadspecific, 'ab') as x:
 txt = unicode(str_or_unicode_parameter).encode('utf8')
 x.write(txt+'\r\n')

However, it doesn't hang if I insert a print statement between with and txt, with anything. Previous testing determined that it hangs on encode().

Aforementioned code is executed in a threading environment, and it hangs in thread that is spawned by master thread. Interpreter is left with an open file.

Same behaviour is repeatable on Python 2.5.1.

----------
components: None
messages: 126390
nosy: henrietta
priority: normal
severity: normal
status: open
title: Python 2.7 hangs on Unicode+threading
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10923>
_______________________________________


More information about the Python-bugs-list mailing list