[issue14308] '_DummyThread' object has no attribute '_Thread__block'

2012-04-18 Thread cooyeah

cooyeah cooy...@gmail.com added the comment:

I saw the similar problem on Ubuntu 12.04 with django development server with 
mediageneartor. As Dustin suggested, I don't think this is related to the del 
_Thread__block statement.

I hacked the __getattribute__ of DummyThread class

def __getattribute__(self, name):
if name == '_Thread__block':
import traceback
traceback.print_stack()
raise AttributeError
return Thread.__getattribute__(self, name)

And I got the following stacktrace:

  File 
/tmp/ve/local/lib/python2.7/site-packages/mediagenerator/filters/coffeescript.py,
 line 54, in _compile
shell=shell, universal_newlines=True)
  File /usr/lib/python2.7/subprocess.py, line 679, in __init__
errread, errwrite)
  File /usr/lib/python2.7/subprocess.py, line 1143, in _execute_child
self.pid = os.fork()
  File /usr/lib/python2.7/threading.py, line 907, in _after_fork
thread._Thread__stop()
  File /usr/lib/python2.7/threading.py, line 608, in __stop
self.__block.acquire()
  File /usr/lib/python2.7/threading.py, line 827, in __getattribute__
traceback.print_stack()

--
nosy: +cooyeah

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14308
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-27 Thread cooyeah

New submission from cooyeah cooy...@gmail.com:

The constructor of TextTestRunner class looks like:
def __init__(self, stream=sys.stderr, descriptions=1, verbosity=1)

Since the default parameter is evaluated only once, if sys.stderr is redirected 
later, the test would still use the old stderr when it was first initialized.

--
components: Tests
messages: 124764
nosy: cooyeah
priority: normal
severity: normal
status: open
title: unittest.TextTextRunner does not respect redirected stderr
type: behavior
versions: Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10786
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com