summaryrefslogtreecommitdiff
path: root/coverage/env.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-10-21 08:46:15 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-10-25 19:01:10 -0400
commitfbb3533295cfcefc6574fb2186d4e8f4e2a20dd3 (patch)
tree0f95bb46f17a95afc685b785f58c763ea3f2a13f /coverage/env.py
parent7de7a340afad244b010f8d4ca81868e65f9f156f (diff)
downloadpython-coveragepy-git-fbb3533295cfcefc6574fb2186d4e8f4e2a20dd3.tar.gz
fix: changes for PyPy3.8
- Update tox.ini to let us run against PyPy3.8 - Some 3.8 behavior is (apparently) only on CPython - PyPy3.8 doesn't get along with virtualenv yet (https://github.com/pypa/virtualenv/issues/2182), so use venv instead for our virtualenv tests.
Diffstat (limited to 'coverage/env.py')
-rw-r--r--coverage/env.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/coverage/env.py b/coverage/env.py
index c300f802..68da83dd 100644
--- a/coverage/env.py
+++ b/coverage/env.py
@@ -50,6 +50,9 @@ class PYBEHAVIOR:
if pep626:
optimize_if_not_debug2 = False
+ # Yet another way to optimize "if not __debug__"?
+ optimize_if_not_debug3 = (PYPY and PYVERSION >= (3, 8))
+
# Can co_lnotab have negative deltas?
negative_lnotab = not (PYPY and PYPYVERSION < (7, 2))
@@ -77,7 +80,7 @@ class PYBEHAVIOR:
# When a function is decorated, does the trace function get called for the
# @-line and also the def-line (new behavior in 3.8)? Or just the @-line
# (old behavior)?
- trace_decorated_def = (PYVERSION >= (3, 8))
+ trace_decorated_def = (CPYTHON and PYVERSION >= (3, 8))
# Are while-true loops optimized into absolute jumps with no loop setup?
nix_while_true = (PYVERSION >= (3, 8))