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

Dependencies won't install if description contains new lines #3610

Closed
3 tasks done
sirex opened this issue Jan 28, 2021 · 5 comments · Fixed by python-poetry/poetry-core#505
Closed
3 tasks done

Dependencies won't install if description contains new lines #3610

sirex opened this issue Jan 28, 2021 · 5 comments · Fixed by python-poetry/poetry-core#505
Labels
area/core Related to the poetry-core library area/pyproject Metadata/pyproject.toml-related good first issue kind/bug Something isn't working as expected status/confirmed Issue is reproduced and confirmed version/1.2.1

Comments

@sirex
Copy link

sirex commented Jan 28, 2021

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Manjaro Linux 20.2.1
  • Poetry version: 1.1.4

Issue

When I create pyproject.toml file, that looks like this:

[tool.poetry]
name = "poetry-bug-repro"
version = "0.1.0"
authors = ["Me <me@example.com>"]
description = """\
Poetry bug repro.
"""
[tool.poetry.dependencies]
python = "^3.9"
requests = "*"

(Note the new line in the description). Then, when I poetry build it, and try to install wheel package, it won't install any dependencies, in this case it won't install requests.

But if I replace description to:

description = "Poetry bug repro."

Then dependencies are installed as expected.

I think, the issue is that when .dist-info/METADATA file is generated, it creates an empty line like this:

Metadata-Version: 2.1
Name: poetry-bug-repro
Version: 0.1.0
Summary: Poetry bug repro.

Author: Me
Author-email: me@example.com
Requires-Python: >=3.9,<4.0
Requires-Dist: requests

After this new line, after Summary, everything else is treated as package description, I guess.

@sirex sirex added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Jan 28, 2021
@sinoroc
Copy link

sinoroc commented Jan 29, 2021

This should be only one line:

@sirex
Copy link
Author

sirex commented Jan 29, 2021

That is fine, if it should be only one line. But Poetry should refuse to build a corrupted package if given summary is not one line. At least, it should strip summary new line is only at the end of string.

@sinoroc
Copy link

sinoroc commented Jan 29, 2021

agreed

sirex added a commit to atviriduomenys/spinta that referenced this issue Feb 28, 2022
After releasing spinta 0.1.7, I found, that it won't install any
dependencies. After quite lengthy debugging I found, that is is caused
by description having a new line.

Failed a bug report for Poetry:
python-poetry/poetry#3610
singingwolfboy added a commit to singingwolfboy/graphql-core that referenced this issue Sep 5, 2022
@cgkoutzigiannis cgkoutzigiannis added area/core Related to the poetry-core library area/pyproject Metadata/pyproject.toml-related status/confirmed Issue is reproduced and confirmed good first issue version/1.2.1 and removed status/triage This issue needs to be triaged labels Oct 3, 2022
@ekralc
Copy link

ekralc commented Oct 13, 2022

This has been addressed before in #1372

It seems that this is an edge case where 'multiline' strings that are actually a single line aren't caught.

For example, this fails as expected with a validation error:

description = """\
Multiple
line
description
"""

But any string with a single trailing newline is still allowed, resulting in an invalid MANIFEST.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/core Related to the poetry-core library area/pyproject Metadata/pyproject.toml-related good first issue kind/bug Something isn't working as expected status/confirmed Issue is reproduced and confirmed version/1.2.1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants