> > the problem with thinking of it this way is that you naturally want to > > extend the concept to >=, but it doesn't work. > > If the concept were consistent, 1.7.dev1 would satisfy >=1.7, but it > > doesn't. > > I'm pretty sure it's consistent. For example, "1.7.2" doesn't satisfy > ">1.7", but it satisfies ">=1.7" (e.g. because it's "part of the > series"). > > I believe the inconsistency you're mentioning doesn't have anything to > do with the comparison operator. It's that pre-releases like "dev1" > are special cases and governed by different rules. [...] are > implicitly excluded
but look at this (using setuptools 8) >>> '1.7.dev1' in pkg_resources.Requirement.parse('foo>=1.7') False >>> '1.7.dev1' in pkg_resources.Requirement.parse('foo<=1.7') True Only the exclusive ordering section speaks of the "!= V.*" bit. The inclusive section just talks of zero padding and relative ordering. The packaging implementation that underlies all this seems to bear this out as well: inclusive: https://github.com/pypa/packaging/blob/master/packaging/specifiers.py#L453 exclusive: https://github.com/pypa/packaging/blob/master/packaging/specifiers.py#L461
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig