Skip to content

Poetry's internal pyproject.toml continually grows larger with empty lines #6457

@mtkennerly

Description

@mtkennerly
  • 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: Windows 11
  • Poetry version: 1.2.0
  • Link of a Gist with the contents of your pyproject.toml file: N/A

Issue

While I've been testing installing/uninstalling a plugin I wrote and running poetry self add ..., I've noticed that my %APPDATA%/pypoetry/pyproject.toml file is growing with more and more blank lines. Right now, there are 319,760 lines total. It looks like this:

[tool.poetry]
name = "poetry-instance"
version = "1.2.0"
description = ""
authors = []
license = ""

[tool.poetry.dependencies]
python = "3.10.5"
poetry = "1.2.0"

[tool.poetry.group.additional.dependencies]

# around 800 blank lines here

poetry-dynamic-versioning = {extras = ["plugin"], version = "^0.18.0"}





poetry-dynamic-versioning-plugin = "^0.4.0"

# then the rest  of the file is blank

Testing from a blank slate

Delete Poetry's internal pyproject.toml and poetry.lock files.

Run: poetry self add poetry-dynamic-versioning[plugin]. Now pyproject.toml looks like:

[tool.poetry]
name = "poetry-instance"
version = "1.2.0"
description = ""
authors = []
license = ""

[tool.poetry.dependencies]
python = "3.10.5"
poetry = "1.2.0"

[tool.poetry.group.additional.dependencies]
poetry-dynamic-versioning = {extras = ["plugin"], version = "^0.18.0"}

Run: poetry self remove poetry-dynamic-versioning. Now pyproject.toml looks like:

[tool.poetry]
name = "poetry-instance"
version = "1.2.0"
description = ""
authors = []
license = ""

[tool.poetry.dependencies]
python = "3.10.5"
poetry = "1.2.0"

[tool.poetry.group.additional.dependencies]



Run: poetry self add poetry-dynamic-versioning[plugin]. Now pyproject.toml looks like:

[tool.poetry]
name = "poetry-instance"
version = "1.2.0"
description = ""
authors = []
license = ""

[tool.poetry.dependencies]
python = "3.10.5"
poetry = "1.2.0"

[tool.poetry.group.additional.dependencies]



poetry-dynamic-versioning = {extras = ["plugin"], version = "^0.18.0"}




Metadata

Metadata

Assignees

No one assigned

    Labels

    area/plugin-apiRelated to plugins/plugin APIkind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions