summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2020-02-23 20:56:04 -0500
committerNed Batchelder <ned@nedbatchelder.com>2020-02-23 21:10:17 -0500
commit6f4c0dcd49c50ae393d30bd0b42c3df7661b50f2 (patch)
treeccd64c8b2578eed1c49e7b8abf528cf5106700c8
parentbbf3c784d25771cdada061f681f64ba5790e890f (diff)
downloadpython-coveragepy-git-6f4c0dcd49c50ae393d30bd0b42c3df7661b50f2.tar.gz
Fix bug with missing negative line numbers on PyPy3 7.1 #943
-rw-r--r--CHANGES.rst4
-rw-r--r--coverage/env.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 17f18ca3..3427c6de 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -26,6 +26,10 @@ Unreleased
- Updated Python 3.9 support to 3.9a3.
+- Fixed a bug with missing negative line numbers on PyPy3 7.1 (`issue 943`_).
+
+.. _issue 943: https://github.com/nedbat/coveragepy/issues/943
+
.. _changes_503:
diff --git a/coverage/env.py b/coverage/env.py
index d194f34a..b5da3b47 100644
--- a/coverage/env.py
+++ b/coverage/env.py
@@ -57,7 +57,7 @@ class PYBEHAVIOR(object):
unpackings_pep448 = (PYVERSION >= (3, 5))
# Can co_lnotab have negative deltas?
- negative_lnotab = (PYVERSION >= (3, 6))
+ negative_lnotab = (PYVERSION >= (3, 6)) and not (PYPY and PYPYVERSION < (7, 2))
# Do .pyc files conform to PEP 552? Hash-based pyc's.
hashed_pyc_pep552 = (PYVERSION >= (3, 7, 0, 'alpha', 4))