semver
semver copied to clipboard
Use fullmatch instead of match
Using match only matches the beginning of the string and can ignore some version information.
I've encountered this problem with this version string '0.7.1dev1+1.*' where not using fullmatch would ignore the '.*' part.
Ah well fullmatch is python 3+ only. I'm not sure how to do the switch between versions here.
I now realize that this PR doesn't solve the more fundamental problem, but at least makes it so that str(parse_constraint('0.7.1dev1+1.*')) == '0.7.1dev1+1.*'.
Where as before it would be str(parse_constraint('0.7.1dev1+1.*')) == '0.7.1dev1+1'.