Skip to content

PEP440 code in setuptools 8.2.1 is parsing version number incorrectly for package with hyphen in name #307

@ghost

Description

Originally reported by: msabramo (Bitbucket: msabramo, GitHub: msabramo)


I created a package called setuptools-markdown (note hyphen in name).

pkg_resources is struggling to parse the version, thinking that markdown is part of the version.

❯ python setup.py egg_info
/Users/marca/python/virtualenvs/setuptools-markdown/lib/python2.7/site-packages/pkg_resources.py:2443: PEP440Warning: 'setuptools (markdown-0.1)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
  PEP440Warning,
/Users/marca/python/virtualenvs/setuptools-markdown/lib/python2.7/site-packages/pkg_resources.py:2443: PEP440Warning: 'setuptools (markdown-0.1.dev2)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
  PEP440Warning,
/Users/marca/python/virtualenvs/setuptools-markdown/lib/python2.7/site-packages/pkg_resources.py:2443: PEP440Warning: 'setuptools (markdown-0.1.dev1)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
  PEP440Warning,
/Users/marca/python/virtualenvs/setuptools-markdown/lib/python2.7/site-packages/pkg_resources.py:2443: PEP440Warning: 'setuptools (markdown-0.1dev1)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
  PEP440Warning,
/Users/marca/python/virtualenvs/setuptools-markdown/lib/python2.7/site-packages/pkg_resources.py:2443: PEP440Warning: 'setuptools (markdown-0.1dev)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
  PEP440Warning,
/Users/marca/python/virtualenvs/setuptools-markdown/lib/python2.7/site-packages/pkg_resources.py:2443: PEP440Warning: 'setuptools (markdown-0.0dev)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
  PEP440Warning,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions