interoperability-peps icon indicating copy to clipboard operation
interoperability-peps copied to clipboard

Make ordered comparisons work sanely for environment markers

Open dstufft opened this issue 10 years ago • 3 comments

Right now the environment markers currently "supports" using things like <, >, <=, and >= however actually using them is just going to create bugs in software if we ever get a Python release that uses a double digit version number. I think that instead, since we have PEP 440, we should just declare that certain environment markers are not strings but are instead version specifiers, and the ones that are just strings we should probably disallow using operators that don't make sense to use.

dstufft avatar Dec 29 '14 14:12 dstufft

@dstufft Did PEP 508 end up covering this appropriately?

ncoghlan avatar May 29 '17 03:05 ncoghlan

Actually, I'd say PEP-508 went too far on the other side (allowing PEP-440 comparisons for everything that looks like a version): cf discussion https://github.com/pypa/packaging/pull/101#pullrequestreview-32037512

xavfernandez avatar May 29 '17 21:05 xavfernandez

We could possibly only support version comparisons on a subset of things, I doubt that is going to break anyone really.

dstufft avatar May 29 '17 22:05 dstufft