poetry
poetry copied to clipboard
Report actual pyproject.toml error text in event of InvalidRequirement error
- [x] I have searched the issues of this repo and believe that this is not a duplicate.
- [x] I have searched the documentation and believe that my question is not covered.
Feature Request
Upon a parse error of a package name in pyproject.toml
, poetry reports the a portion of the malformed package name in its canonicalized form, with no indication that it is canonicalized, and reports characters following the error, but not including the error.
Example:
[tool.poetry]
name = "Malformed PackageName"
version= "1.0"
description = "The package name should not have spaces"
authors = [ "shintoo" ]
Running e.g. poetry update
produces the following error:
[InvalidRequirement]
Invalid requirement, parse error at "'packagen'"
As the text does not match the actual text in pyproject.toml
, it becomes more difficult to track down the source of the user error, especially considering that it merely reports the 8 characters following the error location (but not the error itself). Poetry should report the actual text that is malformed in order to aid the user in fixing their error.