Re: [Python-checkins] CVS: python/dist/src/Python sysmodule.c,2.59,2.60
Modified Files: sysmodule.c Log Message:
Define version_info to be a tuple (major, minor, micro, level); level is a string "a2", "b1", "c1", or '' for a final release.
maybe level should be chosen so that version_info for a final release is larger than version_info for the corresponding beta ? </F>
Fredrik Lundh writes:
Define version_info to be a tuple (major, minor, micro, level); level is a string "a2", "b1", "c1", or '' for a final release. maybe level should be chosen so that version_info for a final release is larger than version_info for the corresponding beta ?
'a2' < 'b1' < 'c1' < 'final' --amk
"AMK" == Andrew M Kuchling
writes:
AMK> Fredrik Lundh writes: >> Define version_info to be a tuple (major, minor, micro, level); >> level is a string "a2", "b1", "c1", or '' for a final release. >> maybe level should be chosen so that version_info for a final >> release is larger than version_info for the corresponding beta >> ? AMK> 'a2' < 'b1' < 'c1' < 'final' Another reason I don't like the strings: 'b9' > 'b10' :( I can imagine a remote possibility of more than 9 pre-releases (counting from 1), but not more than 15 (since PY_RELEASE_SERIAL has to fit in 4 bits), so at the very least, make that string 'a02', 'a03', etc. -Barry
Barry A. Warsaw writes:
I can imagine a remote possibility of more than 9 pre-releases (counting from 1), but not more than 15 (since PY_RELEASE_SERIAL has to fit in 4 bits), so at the very least, make that string 'a02', 'a03', etc.
Doesn't this further damage the human readability of the value? I thought that was an important reason to break it up from sys.hexversion. (Note also that you're not just saying more than 9 pre-releases, but more than 9 at any one of alpha, beta, or release candidate stages. 1-9 at each stage is already 27 pre-release packages.) -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> Corporation for National Research Initiatives
"Fred" == Fred L Drake, Jr
writes:
Fred> Doesn't this further damage the human readability of the Fred> value? A little, but it's a fine compromise between the various constraints. Another way you could structure that tuple is to split the PY_RELEASE_LEVEL and the PY_RELEASE_SERIAL. Make the former even more readable if you want, and make the latter a real int. Thus Python 1.6a2 would have a sys.version_info() of (1, 6, 0, 'alpha', 2), e.g. the form is: (major, minor, micro, level, serial) You can't use 'gamma' though because then you break comparability. Maybe use 'candidate' instead? Sigh. Fred> I thought that was an important reason to break it Fred> up from sys.hexversion. (Note also that you're not just Fred> saying more than 9 pre-releases, but more than 9 at any one Fred> of alpha, beta, or release candidate stages. 1-9 at each Fred> stage is already 27 pre-release packages.) Well, Guido hisself must have thought that there was a remote possibility of more than 9 releases at a particular level, otherwise he'd have jammed PY_RELEASE_SERIAL in 3 bits. I mean, there's no other possible explanation for his choices is there?! :) -Barry
bwarsaw@cnri.reston.va.us writes:
A little, but it's a fine compromise between the various constraints. Another way you could structure that tuple is to split the PY_RELEASE_LEVEL and the PY_RELEASE_SERIAL. Make the former even more readable if you want, and make the latter a real int. Thus Python 1.6a2 would have a sys.version_info() of (1, 6, 0, 'alpha', 2), e.g. the form is:
(major, minor, micro, level, serial)
I've thought of this as well, and certainly prefer it to the 'a01' solution.
You can't use 'gamma' though because then you break comparability. Maybe use 'candidate' instead? Sigh.
Yeah.
Well, Guido hisself must have thought that there was a remote possibility of more than 9 releases at a particular level, otherwise he'd have jammed PY_RELEASE_SERIAL in 3 bits. I mean, there's no other possible explanation for his choices is there?! :)
Clearly. I'll have to break his heart when I release 1.6a16 this afternoon. ;) -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> Corporation for National Research Initiatives
BAW> Thus Python 1.6a2 would have a sys.version_info() of (1, 6, 0, BAW> 'alpha', 2), e.g. the form is: BAW> (major, minor, micro, level, serial) BAW> You can't use 'gamma' though because then you break comparability. Yeah, you can. Don't use 'final'. Use 'omega'... ;-) Skip
"SM" == Skip Montanaro
writes:
BAW> Thus Python 1.6a2 would have a sys.version_info() of (1, 6, BAW> 0, 'alpha', 2), e.g. the form is: BAW> (major, minor, micro, level, serial) BAW> You can't use 'gamma' though because then you break BAW> comparability. SM> Yeah, you can. Don't use 'final'. Use 'omega'... ;-) Or how 'bout: "zats the last one yer gonna git, ya peons, now leave me ALONE" ? -Barry
I can imagine a remote possibility of more than 9 pre-releases (counting from 1), but not more than 15 (since PY_RELEASE_SERIAL has to fit in 4 bits)
or rather, "I can imagine a remote possibility of more than 5 pre-releases (counting from 1), but not more than 9 (since PY_RELEASE_SERIAL has to fit in a single decimal digit"? in the very unlikely case that I'm wrong, feel free to break the glass and install the following patch: #define PY_RELEASE_LEVEL_DESPAIR 0xD #define PY_RELEASE_LEVEL_EXTRAMUNDANE 0xE #define PY_RELEASE_LEVEL_FINAL 0xF /* Serial should be 0 here */ </F>
Fredrik Lundh writes:
maybe level should be chosen so that version_info for a final release is larger than version_info for the corresponding beta ?
I thought about that, but didn't like it; should it perhaps be 'final'? If the purpose is to simply make it increase monotonically like sys.hexversion, why not just use sys.hexversion? -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> Corporation for National Research Initiatives
Fredrik Lundh writes:
maybe level should be chosen so that version_info for a final release is larger than version_info for the corresponding beta ?
I thought about that, but didn't like it; should it perhaps be 'final'? If the purpose is to simply make it increase monotonically like sys.hexversion, why not just use sys.hexversion?
readability? the sys.hexversion stuff isn't exactly obvious:
dir(sys) ... 'hexversion' ... sys.hexversion 17170594
eh? is that version 1.71, or what? "final" is okay, I think. better than "f0", at least ;-) </F>
Fredrik Lundh writes:
readability?
But hexversion retains the advantage that it's been there longer, and that's just too hard to change at this point. (Guido didn't leave the keys to his time machine...)
the sys.hexversion stuff isn't exactly obvious:
I didn't say hexversion was pretty or that anyone liked it! Writing the docs, version_info is a *lot* easier to explain. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> Corporation for National Research Initiatives
"Fred" == Fred L Drake, Jr
writes:
Fred> I didn't say hexversion was pretty or that anyone liked Fred> it! Writing the docs, version_info is a *lot* easier to Fred> explain. So is it easier to explain that the empty string means a final release or that 'final' means a final release? :) -Barry
"FL" == Fredrik Lundh
writes:
FL> readability? Yup. FL> "final" is okay, I think. better than "f0", at least ;-) And I think (but am not 100% positive) that once a final release comes out, Guido stops incrementing the PY_RELEASE_SERIAL's and instead starts incrementing PY_MICRO_VERSION. If that's not the case, then it complicates things a bit. -Barry
Barry A. Warsaw writes:
And I think (but am not 100% positive) that once a final release comes out, Guido stops incrementing the PY_RELEASE_SERIAL's and instead starts incrementing PY_MICRO_VERSION. If that's not the case, then it complicates things a bit.
patchlevel.h includes a comment that indicates serial should be 0 for final releases.
So is it easier to explain that the empty string means a final release or that 'final' means a final release? :)
I think it's the same; either is a special value. The only significant advantage of 'final' is the monotonicity provided by 'final'. I'm not convinced that it's otherwise any better. It also means to create a formatter version number from this that you need to special-case the last item in sys.version_info. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> Corporation for National Research Initiatives
"FL" == Fredrik Lundh
writes:
FL> maybe level should be chosen so that version_info for a final FL> release is larger than version_info for the corresponding beta FL> ? Yes, absolutely. Please don't break the comparability of version_info or the connection with the patchversion.h macros. -Barry
Barry A. Warsaw writes:
Yes, absolutely. Please don't break the comparability of version_info or the connection with the patchversion.h macros.
So I'm the only person here today who prefers the release level of a final version to be '' instead of 'final'? Or did I miss all the messages of enthusiastic support for '' from my screaming fans? -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> Corporation for National Research Initiatives
"Fred" == Fred L Drake, Jr
writes:
Fred> So I'm the only person here today who prefers the release Fred> level of a final version to be '' instead of 'final'? Or Fred> did I miss all the messages of enthusiastic support for '' Fred> from my screaming fans? I've blocked those messages at your mta, so you would't be fooled into doing the wrong thing. I'll repost them to you, but only after you change it back to 'final' means final. Then you can be rightfully indignant at all of us losers who wanted it the other way, and caused you all that extra work! :) root-of-all-evil-ly y'rs, -Barry
Barry A. Warsaw writes:
I've blocked those messages at your mta, so you would't be fooled into doing the wrong thing. I'll repost them to you, but only after you
I don't mind that, just don't stop the groupies! ;) -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> Corporation for National Research Initiatives
"Fred" == Fred L Drake, Jr
writes:
Fred> I don't mind that, just don't stop the groupies! ;) Hey, take it from me, groupies are a dime a dozen. They ask you all kinds of boring questions like what kind of strings you use (or how fast your disk drives are). It's the "gropies" you want. 'Course, tappin' away at a keyboard that only makes one kind of annoying clicking sound and isn't midi-fied won't get you any gropies. Even if you're an amazing hunk of a bass god, it's tough (so you know I'm at a /severe/ disadvantage :) -Barry
participants (6)
-
Andrew M. Kuchling
-
Barry A. Warsaw
-
bwarsaw@cnri.reston.va.us
-
Fred L. Drake, Jr.
-
Fredrik Lundh
-
Skip Montanaro