Skip to content

Commit 70b333e

Browse files
committed
Fix bug with missing negative line numbers on PyPy3 7.1 #943
1 parent bbf3c78 commit 70b333e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGES.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ Unreleased
2626

2727
- Updated Python 3.9 support to 3.9a3.
2828

29+
- Fixed a bug with missing negative line numbers on PyPy3 7.1 (`issue 943`_).
30+
31+
.. _issue 943: https://github.com/nedbat/coveragepy/issues/943
32+
2933

3034
.. _changes_503:
3135

coverage/env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class PYBEHAVIOR(object):
5757
unpackings_pep448 = (PYVERSION >= (3, 5))
5858

5959
# Can co_lnotab have negative deltas?
60-
negative_lnotab = (PYVERSION >= (3, 6))
60+
negative_lnotab = (PYVERSION >= (3, 6)) and (PYPYVERSION >= (7, 2))
6161

6262
# Do .pyc files conform to PEP 552? Hash-based pyc's.
6363
hashed_pyc_pep552 = (PYVERSION >= (3, 7, 0, 'alpha', 4))

0 commit comments

Comments
 (0)