Skip to content

Commit a11bcb7

Browse files
committed
build(test): PyContracts doesn't work on 3.11
and I don't think it ever will.
1 parent f7f16e7 commit a11bcb7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

coverage/env.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,8 @@ class PYBEHAVIOR:
117117
# Environment COVERAGE_NO_CONTRACTS=1 can turn off contracts while debugging
118118
# tests to remove noise from stack traces.
119119
# $set_env.py: COVERAGE_NO_CONTRACTS - Disable PyContracts to simplify stack traces.
120-
USE_CONTRACTS = TESTING and not bool(int(os.environ.get("COVERAGE_NO_CONTRACTS", 0)))
120+
USE_CONTRACTS = (
121+
TESTING
122+
and not bool(int(os.environ.get("COVERAGE_NO_CONTRACTS", 0)))
123+
and (PYVERSION < (3, 11))
124+
)

tox.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ setenv =
3030
# For some tests, we need .pyc files written in the current directory,
3131
# so override any local setting.
3232
PYTHONPYCACHEPREFIX=
33-
# PyContracts can't do 3.11.
34-
py311: COVERAGE_NO_CONTRACTS=1
3533

3634
commands =
3735
# Create tests/zipmods.zip

0 commit comments

Comments
 (0)