You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command pdm show seems to be enforcing draft PEP-639 and expects field license-expression to exist. The command cannot process standard PEP-621 license field.
I have searched the issue tracker and believe that this is not a duplicate.
Steps to reproduce
Create a project with a pyproject.toml and a license field containing:
license = {file = "LICENSE"}
Do pdm install and then pdm show
Actual behavior
When using pdm show -v:
/usr/local/Cellar/pdm/1.13.4/libexec/lib/python3.10/site-packages/pdm/models/project_info.py:48: PDMWarning: 'license-expression' is missing
license_expression = getattr(metadata, "license_expression", None)
Traceback (most recent call last):
File "/usr/local/bin/pdm", line 8, in<module>sys.exit(main())
File "/usr/local/Cellar/pdm/1.13.4/libexec/lib/python3.10/site-packages/pdm/core.py", line 233, in main
returnCore().main(args)
File "/usr/local/Cellar/pdm/1.13.4/libexec/lib/python3.10/site-packages/pdm/core.py", line 168, in main
raise cast(Exception, err).with_traceback(traceback)
File "/usr/local/Cellar/pdm/1.13.4/libexec/lib/python3.10/site-packages/pdm/core.py", line 163, in main
f(options.project, options)
File "/usr/local/Cellar/pdm/1.13.4/libexec/lib/python3.10/site-packages/pdm/cli/commands/show.py", line 72, in handle
project.core.ui.display_columns(list(project_info.generate_rows()))
File "/usr/local/Cellar/pdm/1.13.4/libexec/lib/python3.10/site-packages/pdm/termui.py", line 139, in display_columns
sizes = list(
File "/usr/local/Cellar/pdm/1.13.4/libexec/lib/python3.10/site-packages/pdm/termui.py", line 141, in<lambda>
lambda column: max(map(lambda x: len(strip_ansi(x)), column)),
File "/usr/local/Cellar/pdm/1.13.4/libexec/lib/python3.10/site-packages/pdm/termui.py", line 141, in<lambda>
lambda column: max(map(lambda x: len(strip_ansi(x)), column)),
File "/usr/local/Cellar/pdm/1.13.4/libexec/lib/python3.10/site-packages/click/_compat.py", line 494, in strip_ansi
return _ansi_re.sub("", value)
TypeError: expected string or bytes-like object
Command
pdm show
seems to be enforcing draft PEP-639 and expects field license-expression to exist. The command cannot process standard PEP-621 license field.This may be related to pdm-project/pdm-backend#78
Steps to reproduce
Create a project with a
pyproject.toml
and a license field containing:license = {file = "LICENSE"}
Do
pdm install
and thenpdm show
Actual behavior
When using
pdm show -v
:When using
pdm show --license -v
:Expected behavior
Command
pdm show
should display the package information, including the license.Environment Information
The text was updated successfully, but these errors were encountered: