-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError caused by author field, breaking poetry build
#370
Comments
Faced this problem today, on version 0.12.11 (Python 3.7.2). Had this field in pyproject.toml: Changed to I'll try to fix this on this or next weekend, because it looks like obvious regex mismatch. |
@nackjicholson What do you think, maybe replacing |
Well... my PR got softly rejected, but you or someone else could find some useful solutions among my commits =/ |
Thanks, @kam1sh. The problem is '&' mismatched in Here are some common punctuation marks in names.
|
And I thought this is a good place to discuss introducing Here are example results with inputs listed above:
Not supporting parentheses is the only concern to change to use |
Instead of relying on regular expressions, this patch leverages Python’s builtin `email.utils.parseaddr()` functionality to parse an RFC-822-compliant email address string into its name and address parts. This should also resolve issues with special characters in the name part; see issues python-poetry#370 and python-poetry#798. python-poetry#370 python-poetry#798
You get the same error as well if the author string isn't formatted correctly, e.g. if the closing bracket is missing like "Me <[email protected]" |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one. |
Instead of relying on regular expressions, this patch leverages Python’s builtin `email.utils.parseaddr()` functionality to parse an RFC-822-compliant email address string into its name and address parts. This should also resolve issues with special characters in the name part; see for example Poetry issues python-poetry#370 and python-poetry#798. python-poetry/poetry#370 python-poetry/poetry#798
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
With author field in pyproject.toml
Output:
Perhaps this is for a good reason, but it confused me for a long while because I didn't know this meant something was wrong in my pyproject.toml file. It would be useful to have indications of toml validation problems by field.
Changed to:
Works, and that is fine. Just didn't know there were validation rules for these strings.
The text was updated successfully, but these errors were encountered: