Whole file
sarugaku/resolvelib
The author described this change as “added extended test and applied PoC fix”. It counts as a record because the check below fails on the code as it stood at 62c56b587 and passes on 8931c6dbc, with nothing else changed between the two runs.
Projectsarugaku/resolvelib
Fix saved2021-10-16
Sharing licenceISC · LICENSE
Change size+17 −1
What the code was meant to do, written into the code itself as a save note
added extended test and applied PoC fix
The change
| 199 | 199 | ) | |
| 200 | 200 | ||
| 201 | 201 | def _get_updated_criteria(self, candidate): | |
| 202 | - | criteria = self.state.criteria.copy() | |
| 202 | + | # copy current state's criteria, filtering out any information with this | |
| 203 | + | # candidate's other versions as parent | |
| 204 | + | criteria = { | |
| 205 | + | name: Criterion( | |
| 206 | + | criterion.candidates, | |
| 207 | + | [ | |
| 208 | + | information | |
| 209 | + | for information in criterion.information | |
| 210 | + | if ( | |
| 211 | + | information[1] is None | |
| 212 | + | or self._p.identify(information[1]) != self._p.identify(candidate) | |
| 213 | + | ) | |
| 214 | + | ], | |
| 215 | + | criterion.incompatibilities, | |
| 216 | + | ) | |
| 217 | + | for name, criterion in self.state.criteria.items() | |
| 218 | + | } | |
| 203 | 219 | for requirement in self._p.get_dependencies(candidate=candidate): | |
| 204 | 220 | self._add_to_criteria(criteria, requirement, parent=candidate) | |
| 205 | 221 | return criteria |
The check that tells the two apart
fail→pass·tests/test_poc.py::test_poc
Check file tests/test_poc.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 it62c56b587c69a42c8f006e032bbf17a63df54d45
Broken version dated2021-10-11
Moduleresolvelib.resolvers
Units changedResolution
Fingerprintb2b257a409d3853c
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.