Skip to content

Save canonical PyPi names in pyproject.toml #2098

@adisbladis

Description

@adisbladis
  • 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:
  • Poetry version:
  • Link of a Gist with the contents of your pyproject.toml file:

Issue

When running poetry add (& other commands) the package names is saved verbatim from the command line instead of the canonical normalised PyPi name.

Current:
$ poetry add dJaNgO

pyproject.toml contents:

name = "testproject"
version = "0.1.0"
description = ""
authors = ["Your Name <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.7"
dJaNgO = "^3.0.3"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

Expected:
$ poetry add dJaNgO

pyproject.toml contents:

name = "testproject"
version = "0.1.0"
description = ""
authors = ["Your Name <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.7"
Django = "^3.0.3"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/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