diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-05-07 22:15:48 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-05-07 22:15:48 -0400 |
commit | 36d94fb250dcc838a0fd8f83bb8a6ad53665cb37 (patch) | |
tree | 29e69dd9d19e28797df99d193edf3b5b4d698d7d | |
parent | 2550097155e68d0cc2cd8ceb127d0a7e101dd940 (diff) | |
download | python-coveragepy-git-36d94fb250dcc838a0fd8f83bb8a6ad53665cb37.tar.gz |
A thread tweak suggested in #245
-rw-r--r-- | CHANGES.rst | 4 | ||||
-rw-r--r-- | coverage/pytracer.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 4bf2134b..c007a235 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -42,7 +42,11 @@ Unreleased - Officially support PyPy 5.1, which required no changes, just updates to the docs. +- Make a small tweak to how we compare threads, to avoid buggy custom + comparison code in thread classes. (`issue 245`_) + .. _issue 90: https://bitbucket.org/ned/coveragepy/issues/90/lambda-expression-confuses-branch +.. _issue 245: https://bitbucket.org/ned/coveragepy/issues/245/change-solution-for-issue-164 .. _issue 440: https://bitbucket.org/ned/coveragepy/issues/440/yielded-twisted-failure-marked-as-missed .. _issue 460: https://bitbucket.org/ned/coveragepy/issues/460/confusing-html-report-for-certain-partial .. _issue 469: https://bitbucket.org/ned/coveragepy/issues/469/strange-1-line-number-in-branch-coverage diff --git a/coverage/pytracer.py b/coverage/pytracer.py index 47432324..23f4946c 100644 --- a/coverage/pytracer.py +++ b/coverage/pytracer.py @@ -137,7 +137,7 @@ class PyTracer(object): def stop(self): """Stop this Tracer.""" self.stopped = True - if self.threading and self.thread != self.threading.currentThread(): + if self.threading and self.thread.ident != self.threading.currentThread().ident: # Called on a different thread than started us: we can't unhook # ourselves, but we've set the flag that we should stop, so we # won't do any more tracing. |