From a11bcb70c2faa6e24738c668030a97d8ce9b3ffc Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 2 Jan 2022 07:03:14 -0500 Subject: build(test): PyContracts doesn't work on 3.11 and I don't think it ever will. --- coverage/env.py | 6 +++++- tox.ini | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/coverage/env.py b/coverage/env.py index a00cfa07..64d93e21 100644 --- a/coverage/env.py +++ b/coverage/env.py @@ -117,4 +117,8 @@ TESTING = os.getenv('COVERAGE_TESTING', '') == 'True' # Environment COVERAGE_NO_CONTRACTS=1 can turn off contracts while debugging # tests to remove noise from stack traces. # $set_env.py: COVERAGE_NO_CONTRACTS - Disable PyContracts to simplify stack traces. -USE_CONTRACTS = TESTING and not bool(int(os.environ.get("COVERAGE_NO_CONTRACTS", 0))) +USE_CONTRACTS = ( + TESTING + and not bool(int(os.environ.get("COVERAGE_NO_CONTRACTS", 0))) + and (PYVERSION < (3, 11)) +) diff --git a/tox.ini b/tox.ini index 1164b05c..8c36030d 100644 --- a/tox.ini +++ b/tox.ini @@ -30,8 +30,6 @@ setenv = # For some tests, we need .pyc files written in the current directory, # so override any local setting. PYTHONPYCACHEPREFIX= - # PyContracts can't do 3.11. - py311: COVERAGE_NO_CONTRACTS=1 commands = # Create tests/zipmods.zip -- cgit v1.2.1