Skip to content

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

@sirex

Description

@sirex
  • 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 <[email protected]>"]
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: [email protected]
Requires-Python: >=3.9,<4.0
Requires-Dist: requests

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions