-
-
Notifications
You must be signed in to change notification settings - Fork 312
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
Build breaks for non-ascii emails #965
Comments
Thanks! Unfortunately the fix cannot be the one you describe because this is the accurate behavior per the spec https://packaging.python.org/en/latest/specifications/declaring-project-metadata/#authors-maintainers Are email addresses allowed to contain non-ASCII characters? |
I honestly don't know much about any of this, but a Google search tells me that, apparently, email addresses can contain non-ascii characters as per RFC6532. Why do you say that this is the accurate behavior per the spec? I'm not sure I quite follow. |
(FWIW, I ran into this issue teaching a class to students who have non-ascii characters in their email addresses. We're using rye for package management, and |
@EthanRosenthal , relating to As far as I can tell, For instance, the following doesn't work:
It'll fail when I run
If I manually edit the
My rye version is below:
I appreciate that this issue is still open, and I'm wondering about improving the UX of rye/hatchling 🤔 Right now, I guess hatchling fails fast if there's an invalid email. Would it be appropriate, for (rye or hatchling) to omit writing an invalid email when it creates the If that were the behavior, instead of failing the first time a user runs |
On one hand, it seems like simply not writing non-ascii or invalid email addresses would be the simplest quick fix. On the other hand, it seems in poor taste to omit the email address for anybody with a non-ascii email address, as opposed to fixing the implementation to support non-ascii emails (which I think is doable in the way I reference in my original message). Probably both ought to happen -- invalid email addresses don't get written, and non-ascii email addresses get supported. |
hatch build
breaks if theauthors
section ofpyproject.toml
contains email addresses with non-ascii characters.To reproduce, create a new project with
hatch new
, replace the authorsemail
with non-ascii characters (e.g. Σ@Σ.com), and then runhatch build
. The following error message results:I think that this could be fixed by passing in
username
anddomain
separately toemail.headerregistry.Address
here rather thanaddr_spec
, sinceaddr_spec
requires a properly encoded string.The text was updated successfully, but these errors were encountered: