Skip to content
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

poetry init does not allow é in the authors field #8779

Closed
4 tasks done
jmg-duarte opened this issue Dec 11, 2023 · 6 comments · Fixed by #8798
Closed
4 tasks done

poetry init does not allow é in the authors field #8779

jmg-duarte opened this issue Dec 11, 2023 · 6 comments · Fixed by #8798
Labels
kind/bug Something isn't working as expected

Comments

@jmg-duarte
Copy link
Contributor

  • Poetry version: 1.7.1
  • Python version: 3.12.0
  • OS version and name: MacOS Sonoma 14.1.1
  • pyproject.toml: NA
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

I've read #798 and #4258, those issues deal with "post-init", my issue is with/about init.

As stated in the title, poetry init does not allow for é to exist in the authors field.

Author [José Duarte <redacted>, n to skip]:  
Invalid author string. Must be in the format: John Smith <[email protected]>

If I try Jose... instead, it works though.

I didn't try other characters, but I'd suspect they also fail.

@jmg-duarte jmg-duarte added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Dec 11, 2023
@dimbleby
Copy link
Contributor

For me, é fails but é succeeds. yuk.

I suspect those of us with ascii names are less motivated to figure out the difference between these things. Merge request welcome, I imagine.

@jmg-duarte
Copy link
Contributor Author

@dimbleby
Copy link
Contributor

65 CC 81 vs C3 A9

github has preserved the difference so it's your copy-paste that is lossy

@jmg-duarte
Copy link
Contributor Author

Thank you for sharing the codes!

github has preserved the difference so it's your copy-paste that is lossy

This made no sense to me, when I pasted in Pythex it worked fine! So I was led down the rabbit hole and I found the issue:
MacOS uses (or at the very least used) a slightly different encoding (utf-8-mac).

When I write "é" C3A9 comes out and if I go through poetry init and re-write my name by hand, it works! However, the file where Poetry is getting that information from is probably encoded with the MacOS format. The simplest solution that will most likely always work is to just re-encode as UTF-8.

I'll take a better look later and submit a PR to fix this.

@jmg-duarte
Copy link
Contributor Author

jmg-duarte commented Dec 15, 2023

However, the file where Poetry is getting that information from is probably encoded with the MacOS format.

Precisely, it takes it from the global gitconfig, that encoded my "é" (C3 A9) as "é" (65 CC 81).

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
@abn abn removed the status/triage This issue needs to be triaged label Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants