-
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
Special characters not supported in the authors section of pyproject.toml #798
Comments
Are you writing the pyproject.toml in UTF-8? Are you using a UTF-8 character for the é? |
I had this issue too when using |
Another é-named here. I think the problem (also for #221) is that From Python 3.7 (PEP 540) this can be circumvented by setting the environment variable PYTHONUTF8 which makes Python to ignore local encoding using UTF-8. So, this annoyance for us the beyondasciians (sorry) can be avoided in cmd with:
Or for posh:
|
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
I would say, the problem is related to writing https://github.com/sdispater/poetry/blob/master/poetry/console/commands/init.py#L161 |
@taljaards can you check, if the latest poetry 0.12.17 works well? |
@vlcinsky Yup, it works! Thanks. |
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 #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. |
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: Windows 10 17763.253
Poetry version: 0.12.11
pyproject.toml file: https://gist.github.com/taljaards/b06c1dda1ece0b8d443eb9512213e47d
Issue
Poetry does not support special characters in the "authors" section of the
pyproject.toml
file.I created a new folder, did
poetry init
and answered no to most of the yes/no questions.Afterwards, when doing
poetry add
, it fails:This is because of the "é" character in my name. After removing the "é", operations using the
pyproject.toml
file work as expected.The text was updated successfully, but these errors were encountered: