Skip to content

Doc states that Poetry doesn't enforce  #4811

@alsyia

Description

@alsyia
  • I have searched the issues of this repo and believe that this is not a duplicate.

Issue

The doc on the pyproject.toml file states that:

[version] should follow semantic versioning. However it will not be enforced and you remain free to follow another specification.

I have a version looking like this: 0.4.4-11-gc91ab07. I believe it is semver valid, but the poetry build command returns the following error:

  InvalidVersion

  Invalid version: '0.4.4.11.gc91ab07'

  at /opt/poetry/lib/poetry/_vendor/py3.7/poetry/core/version/version.py:61 in __init__
       57│     def __init__(self, version):  # type: (str) -> None
       58│         # Validate the version and parse it into pieces
       59│         match = VERSION_PATTERN.match(version)
       60│         if not match:
    →  61│             raise InvalidVersion("Invalid version: '{0}'".format(version))

I've found tickets saying that Poetry does enforce PEP 440 style for versions, but it's not clear if this is still the current state of things. The doc looks wrong anyway!

I would rather have a choice since PEP 440 and Semver are not compatible and pretty much everyone else (Docker, Helm, helm) uses Semver nowadays...

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/docsDocumentation issues/improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions