[Distutils] Are chained comparisons allowed in environment markers?

Daniel Holth dholth at gmail.com
Sat Apr 27 17:34:28 CEST 2013


Surely getting farther away from python by trying to prohibit useless
makers just makes the implementation needlessly complex.
On Apr 27, 2013 11:13 AM, "Nick Coghlan" <ncoghlan at gmail.com> wrote:

> On Sun, Apr 28, 2013 at 12:47 AM, PJ Eby <pje at telecommunity.com> wrote:
> > On Sat, Apr 27, 2013 at 5:46 AM, Vinay Sajip <vinay_sajip at yahoo.co.uk>
> wrote:
> >> At the moment, distlib
> >> allows expressions like "python_version >= '2.6'" or "python_version <
> '3.5'"
> >> which are also not mentioned in the PEP. I don't recall seeing any
> discussion
> >> around why allowing inequalities might be a bad idea, but perhaps
> someone
> >> can point me to it? Perhaps it should be mentioned in the PEP.
> >
> > I don't know of any reasons myself.  Perhaps it was thought that
> > restricting the syntax would make it easier to implement?  For Python,
> > that's not especially true.
>
> I don't know for sure either - I pretty much inherited it as is from
> PEP 345, and otherwise haven't messed with it. I already have a note
> in the next draft saying that we might want access to the version
> specifier comparisons to make it easier to place constraints on the
> Python version.
>
> > The marker syntax has some other annoying quirks that make it more
> > difficult to implement and weird to spell, anyway, like mixing actual
> > things ('sys.platform') with non-real things (e.g. 'platform.machine'
> > that's really 'platform.machine()').  It would make a lot more sense
> > (and simplify implementations) to just say 'platform_machine' or even
> > 'machine' in the first place.
> >
> > OTOH, I hope that we can finalize at least the environment marker
> > syntax pronto, so I don't end up with a dead-end version of the
> > syntax.
>
> I have my hands full with other aspects of the PEP 426 update, but if
> you and Vinay want to thrash out a modified version of the environment
> marker syntax (such as always using underscores for names which don't
> correspond directly to usable Python expressions), I'd certainly be
> willing to consider it. It's pretty decoupled from the rest of the
> PEP, which just says in a couple of places "environment marker strings
> can go here", and then defines the syntax for them once.
>
> Cheers,
> Nick.
>
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> http://mail.python.org/mailman/listinfo/distutils-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130427/64d7f0cf/attachment.html>


More information about the Distutils-SIG mailing list