[pypy-issue] [issue1087] Race condition when calling getattr
Andrew McNabb
tracker at bugs.pypy.org
Mon Mar 12 21:14:35 CET 2012
New submission from Andrew McNabb <amcnabb at mcnabbs.org>:
In PyPy 1.8.0, I came across a race condition when calling getattr. This race
condition appears to only occur pypy; I cannot reproduce it in cPython 2.7.
Specifically, in multithreaded code, I occasionally encounter the following
traceback:
2012-03-12 13:56:37,004: ERROR: Traceback: Traceback (most recent call last):
File "/home/amcnabb/python/mrs/http.py", line 157, in _marshaled_dispatch
response = dispatch_method(method, params)
File "/home/amcnabb/python/mrs/http.py", line 128, in _dispatch
return self.server._dispatch(method, params, host)
File "/home/amcnabb/python/mrs/http.py", line 177, in _dispatch
func = getattr(self.instance, 'xmlrpc_' + method)
LookupError: unknown encoding: ascii
I can work around this by adding the following lines at the module level:
import codecs
codecs.lookup('ascii')
----------
messages: 4073
nosy: amcnabb, pypy-issue
priority: bug
status: unread
title: Race condition when calling getattr
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1087>
________________________________________
More information about the pypy-issue
mailing list