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

2012-05-09 Thread Stephen White
Stephen White added the comment: Glad this is fixed. Attached is a Python 2.7 file that demonstrates the problem in a pretty minimal way in case it is of any use to anyone. -- nosy: +Stephen.White Added file: http://bugs.python.org/file25511/bad-thread.py

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

2012-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Wouldn't a _DummyThread._Thread__stop() method override Thread.__stop()? Probably, but that would be quite ugly IMHO. I've now committed the patch as-is in 2.7. In 3.2 it turned out easier: __stop is now spelt _stop, so can be overriden without any hacks. -

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

2012-04-19 Thread Richard Oudkerk
Richard Oudkerk added the comment: > I don't think _DummyThread can override __stop(), because of the name > mangling of __private methods. However, the hasattr() approach would > probably work. Wouldn't a _DummyThread._Thread__stop() method override Thread.__stop()? Like >>> class A(object):

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

2012-04-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset ab9d6c4907e7 by Antoine Pitrou in branch '2.7': Issue #14308: Fix an exception when a "dummy" thread is in the threading module's active list after a fork(). http://hg.python.org/cpython/rev/ab9d6c4907e7 New changeset 41c64c700e1e by Antoine Pitro

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

2012-04-19 Thread Charles-François Natali
Charles-François Natali added the comment: > New patch with the hasattr() approach. LGTM. -- ___ Python tracker ___ ___ Python-bugs-

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

2012-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: New patch with the hasattr() approach. -- Added file: http://bugs.python.org/file25280/dummythreadafterfork2.patch ___ Python tracker ___ _

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

2012-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le jeudi 19 avril 2012 à 21:11 +, Charles-François Natali a écrit : > IMO it should be _DummyThread's stop() method that does the right > thing, either by overriding Thread's stop() method in _DummyThread or > by puting the check inside Thread.stop(), like w

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

2012-04-19 Thread Charles-François Natali
Charles-François Natali added the comment: > Here is a complete patch + tests for 2.7. I like the test. However there's something I find strange with the patch: """ diff --git a/Lib/threading.py b/Lib/threading.py --- a/Lib/threading.py +++ b/Lib/threading.py @@ -887,7 +887,7 @@ def _after_for

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

2012-04-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file25273/dummythreadafterfork.patch ___ Python tracker ___ ___ Python-bugs-l

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

2012-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a complete patch + tests for 2.7. -- Added file: http://bugs.python.org/file25273/dummythreadafterfork.patch ___ Python tracker ___ ___

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

2012-04-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file25274/dummythreadafterfork.patch ___ Python tracker ___ ___ Python-bugs-lis

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

2012-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, could you try applying the following patch to threading.py? diff --git a/Lib/threading.py b/Lib/threading.py --- a/Lib/threading.py +++ b/Lib/threading.py @@ -887,7 +887,7 @@ def _after_fork(): ident = _get_ident() thread.

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

2012-04-18 Thread cooyeah
cooyeah 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,

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

2012-03-21 Thread Dustin Kirkland
Dustin Kirkland added the comment: Okay, update... I did rebuild all of Python from source (actually, I applied it to the Ubuntu python2.7 package, rebuilt that locally, and then upgraded to the new python2.7 deb's. I could see my change was applied /usr/lib/python2.7/threading.py, and I ca

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

2012-03-15 Thread sbt
sbt added the comment: Ignore my last message... -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

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

2012-03-15 Thread sbt
sbt added the comment: _DummyThread.__init__() explicitly deletes self._Thread__block: def __init__(self): Thread.__init__(self, name=_newname("Dummy-%d")) # Thread.__block consumes an OS-level locking primitive, which # can never be used by a _DummyThread. Since a

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

2012-03-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > However, on checking my logs again this morning, I have a few hundred > more of the same error, so that was not effective. Did you restart your server? In your patch, you could use the traceback module (e.g. http://docs.python.org/dev/library/traceback.html

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

2012-03-15 Thread Dustin Kirkland
Dustin Kirkland added the comment: /usr/lib/python2.7/threading.pyc is stock from my distribution, Ubuntu 12.04 LTS, which has python-2.7.3~rc1-1ubuntu2. I did manually apply the patch I've attached here to /usr/lib/python2.7/threading.py, and it *seemed* to silence those errors. However, on

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

2012-03-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't understand how that can happen, since _Thread__block is initialized in Thread.__init__, which is called by _DummyThread.__init__. Did you somehow monkeypatch the threading module? -- nosy: +pitrou ___ Pytho

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

2012-03-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: test needed -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

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

2012-03-14 Thread R. David Murray
Changes by R. David Murray : -- stage: -> test needed title: Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored -> '_DummyThread' object has no attribute '_Thread__block' type: crash -> behavior versions: +Python 3.2, Pytho