Ensure that authors and maintainers are normalized. #276
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a bugfix from my point of view, but feel free to reject if you feel this is expected.
Steps to reproduce
pyproject.toml
.poetry install
.Expected outcome is that the installation takes place but instead you get a mismatch on the
AUTHOR_REGEX
.An alternative way to reproduce is to update
user.name
in~/.gitconfig
and create a new project withpoetry new
. Since poetry seems to read the author name from the git config, you will have the same issue with the generatedpyproject.toml
.While this sounds evil or an attempt to break things on purpose, I actually had such a string in my
.gitconfig
but unfortunately I don't remember how it got there, I blame one of the git UIs.Explanation
Unicode can represent characters in one of two ways, combined or decomposed. My surname contains the letter Ç:
LATIN CAPITAL LETTER C WITH CEDILLA
LATIN CAPITAL LETTER C
+COMBINING CEDILLA
.When I have the decomposed version, looks like it is a mismatch with the
AUTHOR_REGEX
.Fix
I normalized the authors and maintainers which seemed to solve the issue. Note that you will see I've decomposed the
é
in thesample_project
but I have not changed the assert in the related test case, thus, the same test case serves my purpose.Please note that the output is rendered same for the both versions of the strings, thus the diff seems funny.