+
Skip to content

Unable to parse version that ends with ~ #39

@sbrunner

Description

@sbrunner

Get the version from https://packages.debian.org/bookworm/ruby-prawn.

import debian_inspector.version
debian_inspector.version.Version.from_string('2.4.0+dfsg-1~')

=>

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sbrunner/.pyenv/versions/3.11.9/lib/python3.11/site-packages/debian_inspector/version.py", line 141, in from_string
    raise ValueError('Invalid version string: "{}"'.format(version))
ValueError: Invalid version string: "2.4.0+dfsg-1~"

Expected result:

Version(epoch=0, upstream='2.4.0+dfsg', revision='1~')

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

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载