At 02:09 PM 7/6/2007 -0400, Jim Fulton wrote: >We (me and a bunch of my Zope friends) find that we'll often want >version specifications of the form: > > project_name >=Vdev, <V+1dev (e.g. "foo >=1dev, <2dev") > >We think this is so common that we'd like a short-hand way of >spelling it. > >I'll note that I'm not even sure I got the spelling above right. The >intent is to request version 1, meaning any release of version 1. I >think that's what I spelled above, although I'm not sure. If I got >it wrong, maybe someone will correct me. Aside from the verbosity of >the spelling above, I think the difficulty in spelling it is a strike >against it. Note that a naive spelling: "foo >=1, <2" is wrong >because it excludes pre-releases of 1 and includes pre-releases of 2. > >I propose that a valid version that ends in a number and that isn't >preceded by an operator be a valid version specifier and be >interpreted as a range. So, assuming that I know how to spell the >range, a specification of: > > project_name V (e.g. "foo 1") > >would be equivalent to: > > project_name >=Vdev, <V+1 (e.g. "foo >=1dev, <2dev") > >This would work with multi-part versions, so "foo 1.2" would be >equivalent to "foo >=1.2dev <1.3dev". > >Note that this could be combined with other version specifiers. For >example, to require any version 1 or 2 of foo or versions 3.2 final >or later: > > foo 1, 2, >=3.2 > >Also note that any version will do, so: > > foo 1.2a1 > >would be equivalent to: > > foo >=1.2a1dev <1.2a2dev > >And note that versions that don't end in numbers wouldn't be valid >version specifiers, so: > > foo 1a > >would not be a valid specifier. > >Thoughts?
I'm not sure what I think of ' ' as the operator. This change would also have to be an 0.7 feature, as any package that uses it will be dependent on having a setuptools version that understands it, at least in order to build an egg. (We could have egg_info write the expanded forms, so that the built eggs' dependencies would be comprehensible to older versions.) I'm also not sure that '1a' can't/shouldn't be a valid specifier, although I suppose it would mean being equal to either ">= 1a.dev, <1b.dev" or ">= 1a0dev, <1a1dev", both of which are a little weird. :) _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
