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

Author names with commas result in invalid PKG-INFO Author-Email field #211

Closed
1 task done
vbaltrusaitis-reef opened this issue Feb 2, 2024 · 1 comment · Fixed by #228
Closed
1 task done

Comments

@vbaltrusaitis-reef
Copy link

  • I have searched the issue tracker and believe that this is not a duplicate.

Steps to reproduce

  1. Run:
mkdir author-name-bug-demo
cd author-name-bug-demo
pdm init --dist --non-interactive
  1. Edit pyproject.toml, replace authors table with [{name = "Company, Inc.", email = "[email protected]"}]

  2. Run:

pdm build
cd dist
tar xf author_name_bug_demo-0.1.0.tar.gz

Actual behavior

The resulting file author_name_bug_demo-0.1.0/PKG-INFO will have this line:

Author-Email: Company, Inc. <[email protected]>

This field does not conform to Author-Email field specification as per https://packaging.python.org/en/latest/specifications/core-metadata/#author-email .

Uploading the built packages to PyPI fails.

Expected behavior

in PKG-INFO, Company, Inc should be quoted:

Author-Email: "Company, Inc." <[email protected]>

Environment Information

PDM version:
  2.12.3
Python Interpreter:
  /home/vbr/tmp/author-name-bug-demo/.venv/bin/python (3.12)
Project Root:
  /home/vbr/tmp/author-name-bug-demo
Local Packages:
  
{
  "implementation_name": "cpython",
  "implementation_version": "3.12.0",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "6.5.11-300.fc39.x86_64",
  "platform_system": "Linux",
  "platform_version": "#1 SMP PREEMPT_DYNAMIC Wed Nov  8 22:37:57 UTC 2023",
  "python_full_version": "3.12.0",
  "platform_python_implementation": "CPython",
  "python_version": "3.12",
  "sys_platform": "linux"
}
@frostming frostming transferred this issue from pdm-project/pdm Feb 3, 2024
@rooterkyberian
Copy link

seems like bug is in vendored package;

submitted fix upstream pypa/pyproject-metadata#87 so after it gets merged it is a matter of updating vendored package - which seems pretty out of date ATM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants