Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Use fullmatch instead of match #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

abergeron
Copy link

@abergeron abergeron commented May 27, 2020

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.

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.
@abergeron
Copy link
Author

Ah well fullmatch is python 3+ only. I'm not sure how to do the switch between versions here.

@abergeron
Copy link
Author

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'.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant