Skip to content

Parsing of poetry.lock generated with Poetry >= 1.5.0 fails #67

Description

@plaa
  • Dependency Parser version: 0.6.3
  • Python version: 3.10.12
  • Operating System: MacOS Ventura

Description

Poetry has deprecated and in 1.5.0 removed writing of the category field into the poetry.lock file. dparse assumes this field to always be present. Thus dparse cannot parse poetry.lock files generated with a recent Poetry version and fails with the exception Malformed poetry lock file

dparse/dparse/parser.py

Lines 461 to 467 in eb917b3

try:
name = dep['name']
spec = "=={version}".format(
version=Version(dep['version']))
section = dep['category']
except KeyError:
raise KeyError("Malformed poetry lock file")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions