-
-
Notifications
You must be signed in to change notification settings - Fork 420
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
pdm always crashes on a poetry project with names including comma #2665
Comments
According to the specification the name can't contain commas, if I interpret it correctly |
I assume the specification has very little to say about what the core metadata certainly seems to allow commas in the "author" field per the example https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata-author |
Oh, so PDM reads and tries to convert the Poetry table on the fly 🤔? I thought this would only happen when "importing" a project. Regarding the spec:
Maybe worth asking on discuss.python.org. |
An email name needs to be non-comma according to the spec., so I have to change my name. As @pawamoy said, PDM should not be crashed on a poetry project even if it contains an invalid name before any convertion. Maybe it can warn us to correct the name format. I had to spend a bit of time to figure out the reason. |
This topic is related to #2651 and to state it clearly: As for how it is possible for commas to be supported in name, if they are used for seperating values as well, the answer lies in https://packaging.python.org/en/latest/specifications/core-metadata/#author-email -> RFC-822, assumes use of quotes to escape them. |
Make sure you run commands with
-v
flag before pasting the output.Steps to reproduce
On my test project with pyproject.toml of which name contains any comma(,), e.g.:
pdm command-line execution always crashes.
Actual behavior
I got a main error when executing any CLI commands.
It seems to be due to a regex, unmatching commas.
Example as follows:
Expected behavior
$ pdm
execution succeeded and show a help page.Environment Information
(cannot launch CLI)
The text was updated successfully, but these errors were encountered: