Skip to content

inconsistency with different version specifier and special version ? #112

@gst

Description

@gst

Hi,

Request for explanation :

I recently discovered what I think looks like an inconsistency in the packaging package (as vendored by pip-9.0.1).

I've built for my work a wheel with this exact version : 3.0.32-rdo.1.0.0

When I use pip with pip install mypackage==3.0.32-rdo.1.0.0 it successfully identify the correct wheel and install it. (1)

But if I use pip with pip install mypackage~=3.0.32-rdo.1.0.0 ( ~= instead of == ) then I get an error from packaging package (2) :

Invalid requirement: 'mypackage~=3.0.32-rdo.1.0.0'
Traceback (most recent call last):
  File "/home/gregory/foo/lib/python2.7/site-packages/pip/req/req_install.py", line 82, in __init__
    req = Requirement(req)
  File "/home/gregory/foo/lib/python2.7/site-packages/pip/_vendor/packaging/requirements.py", line 96, in __init__
    requirement_string[e.loc:e.loc + 8]))
InvalidRequirement: Invalid requirement, parse error at "'do.1.0.0'"

(1) + (2) : this is what I think looks like an inconsistency or I miss something.. ?

  1. side question : I'm actually managing a wheels folder from wich I pip install with --find-links so.

in it I have many version of this mypackage ; some of them don't have the extra -rdo.x.y.z subversion part (or tag is a more appropriate term maybe).

When I so install with pip install mypackage~=3.0.32 (or >= ) then my -rdo.x.y.z other wheel isn't resolved/installed but only a "normal" version (==3.0.32) without this subversion or version tag.

is it normal ?

I'm not sure using such version subpart is very common / nor really officially supported actually .. ?
if you have any good pointer on that ?

Thx for any info :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions