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

Use fullmatch instead of match#3

Open
abergeron wants to merge 2 commits into
python-poetry:masterfrom
abergeron:patch-1
Open

Use fullmatch instead of match#3
abergeron wants to merge 2 commits into
python-poetry:masterfrom
abergeron:patch-1

Conversation

@abergeron

@abergeron abergeron commented May 27, 2020

Copy link
Copy Markdown

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
Copy Markdown
Author

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

@abergeron

Copy link
Copy Markdown
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