Whole file
python-constraint/python-constraint
The author described this change as “fix: scenario with a constraint without variables in python 3.”. It counts as a record because the check below fails on the code as it stood at 3c0b5acf8 and passes on 58cd10e12, with nothing else changed between the two runs.
Fix saved2018-06-04
Sharing licenceBSD-2-Clause · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a save note
fix: scenario with a constraint without variables in python 3.
The change
| 281 | 281 | constraints = [] | |
| 282 | 282 | for constraint, variables in self._constraints: | |
| 283 | 283 | if not variables: | |
| 284 | - | variables = allvariables | |
| 284 | + | variables = list(allvariables) | |
| 285 | 285 | constraints.append((constraint, variables)) | |
| 286 | 286 | vconstraints = {} | |
| 287 | 287 | for variable in domains: |
The check that tells the two apart
fail→pass·tests/test_constraint.py::test_constraint_without_variables
Check file tests/test_constraint.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it3c0b5acf8bc9fb7d11603a709c0222021c09474b
Broken version dated2018-05-30
Moduleconstraint.__init__
Units changedProblem
Fingerprintd4293216b506b556
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.