One function

parse_version in ekalinin/nodeenv

The author described this change as Fix version discovery; #356, #357 (#358). It counts as a record because the check below fails on the code as it stood at 9d74cd8f0 and passes on 69e310af9, with nothing else changed between the two runs.

Fix saved2024-06-04
Sharing licenceBSD-2-Clause · LICENSE
Change size+5 1

What the code was meant to do, written into the code itself as a docstring

Parse version string to a tuple of integer parts

The change

22 """
33 Parse version string to a tuple of integer parts
44 """
5- return tuple(map(int, version_str.replace('v', '').split('.')))
5+ v = version_str.replace('v', '').split('.')[:3]
6+ # remove all after '+' in the PATCH part of the version
7+ if len(v) >= 3:
8+ v[2] = v[2].split('+')[0]
9+ return tuple(map(int, v))

The check that tells the two apart

failpass·tests/nodeenv_test.py::test_parse_version

Check file tests/nodeenv_test.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 it9d74cd8f083ceeb546a33052683f8df083d54b1e
Broken version dated2024-05-28
Modulenodeenv
Units changedparse_version
Fingerprint062e6d4d39c96087
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in ekalinin/nodeenv