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

2.2.0 regression: All project installs with multiline descriptions are broken #230

Closed
sigma67 opened this issue Apr 15, 2024 · 4 comments · Fixed by #231
Closed

2.2.0 regression: All project installs with multiline descriptions are broken #230

sigma67 opened this issue Apr 15, 2024 · 4 comments · Fixed by #231

Comments

@sigma67
Copy link

sigma67 commented Apr 15, 2024

Since yesterday's release we are getting the following error on all our Python projects with multiline descriptions:

See /tmp/pdm-install-47973kyo.log for detailed debug log.
[BuildError]: Build backend raised error: Showing the last 10 lines of the build output:
    super().__init__(location, config_settings)
  File "/tmp/pdm-build-env-34cbu858-shared/lib/python3.10/site-packages/pdm/backend/base.py", line 99, in __init__
    self.config = Config.from_pyproject(self.location)
  File "/tmp/pdm-build-env-34cbu858-shared/lib/python3.10/site-packages/pdm/backend/config.py", line 79, in from_pyproject
    return cls(root, data)
  File "/tmp/pdm-build-env-34cbu858-shared/lib/python3.10/site-packages/pdm/backend/config.py", line 44, in __init__
    self.validate(data, root)
  File "/tmp/pdm-build-env-34cbu858-shared/lib/python3.10/site-packages/pdm/backend/config.py", line 65, in validate
    raise ValidationError(e.args[0], e.key) from e
pdm.backend.exceptions.ValidationError: The description must be a single line
WARNING: Add '-v' to see the detailed traceback

Affected descriptions look like this:

description = '''\
        A example Python package
        Lorem ipsum
    '''

This worked fine before 2.2.0

@sigma67
Copy link
Author

sigma67 commented Apr 15, 2024

The following multiline syntax seems unaffected:

description = """\
        A example Python package\
        Lorem ipsum\
    """

But only if backslashes are set at the end of the line - else same error.

@sigma67
Copy link
Author

sigma67 commented Apr 15, 2024

Root cause here: pypa/pyproject-metadata#76

@frostming
Copy link
Contributor

That validation is added intentionally, and that is the specification. Please consider update your description to single-line.

@sigma67
Copy link
Author

sigma67 commented Apr 15, 2024

We will do so, but it is a pretty rough breaking change to be introduced over night.

It affects every package install as we don't have an upper bound on pdm-backend

@frostming frostming linked a pull request Apr 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants