Author berker.peksag
Recipients berker.peksag, pitrou, rhettinger, serhiy.storchaka
Date 2014-04-30.18:32:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398882730.56.0.774959181019.issue21137@psf.upfronthosting.co.za>
In-reply-to
Content
Here's an updated patch. Thanks for the reviews.

> And of course we should keep "at 0x..." part, because it is the way to distinguish different lock objects.

Done.

    $ ./python -c "import threading; l = threading.Lock(); print(l)"
    <unlocked _thread.lock object at 0x7f0a19e7b1f8>


> The repr of threading._RLock contains owner and count, but not lock/unlock status.

Done.

    $ ./python -c "import threading; rl = threading.RLock(); rl.acquire(); print(rl)"
    <locked _thread.RLock object owner=139769600231168 count=1>


>  The repr of locks from _dummy_thread also should contain lock/unlock status.

Done.

    $ ./python -c "import dummy_threading as threading; l = threading.Lock(); print(l)"
    <unlocked _dummy_thread.LockType object at 0x7fb334245400>

    $ ./python -c "import dummy_threading as threading; l = threading.RLock(); print(l)"
    <unlocked threading._RLock object owner=None count=0 at 0x7f524d0138e0>


> As for tests, I think assertRegex() will produce more useful error report.

Done.
History
Date User Action Args
2014-04-30 18:32:10berker.peksagsetrecipients: + berker.peksag, rhettinger, pitrou, serhiy.storchaka
2014-04-30 18:32:10berker.peksagsetmessageid: <1398882730.56.0.774959181019.issue21137@psf.upfronthosting.co.za>
2014-04-30 18:32:10berker.peksaglinkissue21137 messages
2014-04-30 18:32:10berker.peksagcreate